-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Jest with Node test framework (#97)
* Convert tests to Node test framework * Make the tests run (despite nodejs/node#50287) * Remove Jest * Drop old Node 14
- Loading branch information
1 parent
ca10780
commit 15b259f
Showing
22 changed files
with
1,184 additions
and
10,008 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
packages/eslint-plugin-ecmascript-compat-example/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
packages/eslint-plugin-ecmascript-compat/lib/compareVersions.spec.js
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
packages/eslint-plugin-ecmascript-compat/lib/compareVersions.test.js
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const assert = require('node:assert'); | ||
const { test } = require('node:test'); | ||
const compareVersions = require('./compareVersions'); | ||
|
||
test('equal', () => { | ||
assert.strictEqual(compareVersions('1.2.3', '1.2.3'), 0); | ||
}); | ||
|
||
test('smaller', () => { | ||
assert.strictEqual(compareVersions('1.2.0', '1.2.3'), -1); | ||
assert.strictEqual(compareVersions('1.2', '1.3'), -1); | ||
}); | ||
|
||
test('larger', () => { | ||
assert.strictEqual(compareVersions('1.2.3', '1.2.0'), 1); | ||
}); | ||
|
||
test('partial on one side', () => { | ||
assert.strictEqual(compareVersions('1.1', '1.2.3'), -1); | ||
assert.strictEqual(compareVersions('1.1.1', '1.2'), -1); | ||
}); | ||
|
||
test('when it matters to treat parts as numbers', () => { | ||
assert.strictEqual(compareVersions('9', '10'), -1); | ||
}); |
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
File renamed without changes.
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
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
Oops, something went wrong.