diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2015-04-02 08:54:44 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-04-02 08:57:59 +0300 |
commit | d380188e161be31f5a4f53947de6bc28df4732d8 (patch) | |
tree | 7e856746a114c6e3f103db0f1c50a63788a4b7c7 /node_modules/semver/test | |
parent | e7de39656c84749618860173ccf3c1e180965960 (diff) |
semver@4.3.3
Don't throw on parse(null), handle numeric version strings better.
Diffstat (limited to 'node_modules/semver/test')
-rw-r--r-- | node_modules/semver/test/big-numbers.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/node_modules/semver/test/big-numbers.js b/node_modules/semver/test/big-numbers.js index 692aa2414..c051864bc 100644 --- a/node_modules/semver/test/big-numbers.js +++ b/node_modules/semver/test/big-numbers.js @@ -22,3 +22,10 @@ test('big number is like too long version', function (t) { t.equal(semver.inc(v, 'patch'), null) t.end() }) + +test('parsing null does not throw', function (t) { + t.equal(semver.parse(null), null) + t.equal(semver.parse({}), null) + t.equal(semver.parse(new semver.SemVer('1.2.3')).version, '1.2.3') + t.end() +}) |