-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2af6fe7
commit 98057a0
Showing
2 changed files
with
14 additions
and
14 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 |
---|---|---|
|
@@ -12,10 +12,10 @@ const e = (npm, node, _id = '[email protected]') => { | |
return { engines, _id } | ||
} | ||
|
||
t.test('no engine', async t => | ||
t.test('no engine', async () => | ||
checkEngine({}, '1.3.2', '0.2.1')) | ||
|
||
t.test('empty engine object', async t => | ||
t.test('empty engine object', async () => | ||
checkEngine(e(), '1.1.2', '0.2.1')) | ||
|
||
t.test('node version too old', async t => | ||
|
@@ -30,22 +30,22 @@ t.test('npm version too old', async t => | |
code: 'EBADENGINE', | ||
})) | ||
|
||
t.test('force node version too old', async t => | ||
t.test('force node version too old', async () => | ||
checkEngine(e(null, '0.1.0', '[email protected]'), '1.3.2', '0.2.1', true)) | ||
|
||
t.test('cannot force when npm version too old', async t => | ||
t.throws(() => checkEngine(e('^1.4.6', null, '[email protected]'), '1.3.2', '0.2.1'), { | ||
code: 'EBADENGINE', | ||
})) | ||
|
||
t.test('npm prerelease', async t => | ||
t.test('npm prerelease', async () => | ||
checkEngine(e('>=1.2.3', '>=0.8'), '69.420.0-yolo', '69.420.0-yolo')) | ||
|
||
t.test('node prerelease', async t => | ||
t.test('node prerelease', async () => | ||
checkEngine(e('>=1.2.3', '>=0.8'), '1.2.3', '69.420.0-yolo')) | ||
|
||
t.test('no node version', async t => | ||
t.test('no node version', async () => | ||
checkEngine(e('>=1.2.3', '>=0.8'), '1.2.3', null)) | ||
|
||
t.test('no npm version', async t => | ||
t.test('no npm version', async () => | ||
checkEngine(e('>=1.2.3', '>=0.8'), null, '1.2.3')) |
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