Skip to content

Commit 80ea77d

Browse files
UlisesGasconRafaelGSS
authored andcommitted
test: added platform specific tests
1 parent 7c2f587 commit 80ea77d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ async function t () {
2222
assert.ok(await isNodeVulnerable('13.0.0'))
2323
assert.ok(await isNodeVulnerable('12.0.0'))
2424
assert.ok(await isNodeVulnerable('v0.12.18'))
25+
26+
// Platform specific
27+
assert.ok(await isNodeVulnerable('19.0.0', 'linux'))
28+
assert.ok(await isNodeVulnerable('18.0.0', 'win32'))
29+
assert.ok(await isNodeVulnerable('14.0.0', 'android'))
30+
assert.rejects(() => isNodeVulnerable('20.0.0', 'non-valid-platform'), /platform non-valid-platform is not valid. Please use aix,darwin,freebsd,linux,openbsd,sunos,win32,android/)
2531
}
2632

2733
t()

0 commit comments

Comments
 (0)