Sha256: d933cd0f87ba6591aeb63d7748129215db64e34472b354d0fdcc1af27dc3468c
Contents?: true
Size: 707 Bytes
Versions: 170
Compression:
Stored size: 707 Bytes
Contents
var tap = require('tap'); var test = tap.test; var semver = require('../semver.js'); var clean = semver.clean; test('\nclean tests', function(t) { // [range, version] // Version should be detectable despite extra characters [ ['1.2.3', '1.2.3'], [' 1.2.3 ', '1.2.3'], [' 1.2.3-4 ', '1.2.3-4'], [' 1.2.3-pre ', '1.2.3-pre'], [' =v1.2.3 ', '1.2.3'], ['v1.2.3', '1.2.3'], [' v1.2.3 ', '1.2.3'], ['\t1.2.3', '1.2.3'], ['>1.2.3', null], ['~1.2.3', null], ['<=1.2.3', null], ['1.2.x', null] ].forEach(function(tuple) { var range = tuple[0]; var version = tuple[1]; var msg = 'clean(' + range + ') = ' + version; t.equal(clean(range), version, msg); }); t.end(); });
Version data entries
170 entries across 92 versions & 7 rubygems