Skip to content

Commit 4d84a90

Browse files
committed
fix: tests with nodejs 20
1 parent 4733b0e commit 4d84a90

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

index.js

100644100755
File mode changed.

test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ const { isNodeVulnerable } = require('./index')
33

44
async function t () {
55
// of course, this test is fragile
6+
assert.ok(await isNodeVulnerable('20.5.0'))
7+
assert.ok(await isNodeVulnerable('20.0.0'))
68
assert.ok(await isNodeVulnerable('19.0.0'))
79
assert.ok(await isNodeVulnerable('18.0.0'))
810
assert.ok(await isNodeVulnerable('14.0.0'))
@@ -14,7 +16,7 @@ async function t () {
1416
assert.rejects(() => isNodeVulnerable('lts'), /not get exactly one version/)
1517
assert.rejects(() => isNodeVulnerable('999'), /not get exactly one version/)
1618
assert.rejects(() => isNodeVulnerable('Unobtanium'), /not get exactly one version/) // i.e. not found
17-
assert.rejects(() => isNodeVulnerable('20.0.0'), /not get exactly one version/)
19+
assert.rejects(() => isNodeVulnerable('21.0.0'), /not get exactly one version/)
1820

1921
// EOL
2022
assert.ok(await isNodeVulnerable('17.0.0'))

0 commit comments

Comments
 (0)