Example #1
0
        public void NoPatchVersion_CorrectResult()
        {
            var          resolver = new NpmVersionResolver(npm, config);
            const string version  = "1.9";
            const string expected = "1.9.1";

            var result = resolver.GetSingleVersion(new PackageRange("test", version, "")).Result;

            Assert.Equal(expected, result.Version);
        }
Example #2
0
        public void VersionWithSuffix_CorrectResult()
        {
            var          resolver = new NpmVersionResolver(npm, config);
            const string version  = "1.0.0-preview2-final";
            const string expected = "1.0.0-preview2-final";

            var result = resolver.GetSingleVersion(new PackageRange("test", version, "")).Result;

            Assert.Equal(expected, result.Version);
        }
Example #3
0
        public void FullVersion_CorrectResult()
        {
            var          resolver = new NpmVersionResolver(npm, config);
            const string version  = "1.2.3";
            const string expected = "1.2.3";

            var package = new PackageRange("test", version, "");
            var result  = resolver.GetSingleVersion(package).Result;

            Assert.Equal(expected, result.Version);
        }