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

Version Path
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/insight/node_modules/os-name/node_modules/win-release/node_modules/semver/test/clean.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/update-notifier/node_modules/semver-diff/node_modules/semver/test/clean.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/insight/node_modules/os-name/node_modules/win-release/node_modules/semver/test/clean.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/update-notifier/node_modules/semver-diff/node_modules/semver/test/clean.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/update-notifier/node_modules/semver-diff/node_modules/semver/test/clean.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/insight/node_modules/os-name/node_modules/win-release/node_modules/semver/test/clean.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/insight/node_modules/os-name/node_modules/win-release/node_modules/semver/test/clean.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/update-notifier/node_modules/semver-diff/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/insight/node_modules/os-name/node_modules/win-release/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/update-notifier/node_modules/semver-diff/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.18 node_modules/bower/node_modules/insight/node_modules/os-name/node_modules/win-release/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.18 node_modules/bower/node_modules/update-notifier/node_modules/semver-diff/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.17 node_modules/bower/node_modules/update-notifier/node_modules/semver-diff/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.17 node_modules/bower/node_modules/insight/node_modules/os-name/node_modules/win-release/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.16 node_modules/bower/node_modules/insight/node_modules/os-name/node_modules/win-release/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.16 node_modules/bower/node_modules/update-notifier/node_modules/semver-diff/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.15 node_modules/bower/node_modules/insight/node_modules/os-name/node_modules/win-release/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.15 node_modules/bower/node_modules/update-notifier/node_modules/semver-diff/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.14 node_modules/bower/node_modules/insight/node_modules/os-name/node_modules/win-release/node_modules/semver/test/clean.js
trusty-festivity-extension-2.5.14 node_modules/bower/node_modules/update-notifier/node_modules/semver-diff/node_modules/semver/test/clean.js