diff options
author | isaacs <i@izs.me> | 2013-06-25 07:58:46 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-06-25 08:03:16 +0400 |
commit | f1c5501bbfe8bf13050c0b5046b767798435b7cf (patch) | |
tree | f2c267ca869d58430677bfa8c4d65c5523de86a4 /node_modules/semver/test | |
parent | ade811064ddb6478b5cf7d039a5555b4725b1aa6 (diff) |
semver@2.0.8
Diffstat (limited to 'node_modules/semver/test')
-rw-r--r-- | node_modules/semver/test/index.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/semver/test/index.js b/node_modules/semver/test/index.js index 2ac51deba..a62aaa563 100644 --- a/node_modules/semver/test/index.js +++ b/node_modules/semver/test/index.js @@ -514,3 +514,18 @@ test('\nstrict vs loose ranges', function(t) { }); t.end(); }); + +test('\nmax satisfying', function(t) { + [[['1.2.3', '1.2.4'], '1.2', '1.2.4'], + [['1.2.4', '1.2.3'], '1.2', '1.2.4'], + [['1.2.3','1.2.4','1.2.5','1.2.6'], '~1.2.3', '1.2.6'] + ].forEach(function(v) { + var versions = v[0]; + var range = v[1]; + var expect = v[2]; + var loose = v[3]; + var actual = semver.maxSatisfying(versions, range, loose); + t.equal(actual, expect); + }); + t.end(); +}); |