-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply 'standard' auto-fixes to remainder of tests
- Loading branch information
1 parent
42e765b
commit b30f2ce
Showing
6 changed files
with
142 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
var tap = require('tap'); | ||
var test = tap.test; | ||
var semver = require('../semver.js'); | ||
var clean = semver.clean; | ||
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(); | ||
}); | ||
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() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters