Skip to content

Commit bde0dfc

Browse files
committed
Add test
1 parent 29975a7 commit bde0dfc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/helpers/versions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ export const FULL_VERSION = '6.0.0'
22
export const MAJOR_VERSION = '6'
33
export const MAJOR_FULL_VERSION = '6.17.1'
44
export const UNKNOWN_VERSION = '6.99.0'
5+
export const UNKNOWN_ALIAS = 'unknown'
56
export const IOJS_VERSION = '4.0.0'
67
export const UNSTABLE_VERSION = '0.11.16'

test/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
MAJOR_VERSION,
88
MAJOR_FULL_VERSION,
99
UNKNOWN_VERSION,
10+
UNKNOWN_ALIAS,
1011
} from './helpers/versions.js'
1112

1213
test('Keep full versions', async (t) => {
@@ -29,4 +30,8 @@ test('Passes options to all-node-versions', async (t) => {
2930
)
3031
})
3132

33+
test('Validates unknown alias', async (t) => {
34+
await t.throwsAsync(nodeVersionAlias(UNKNOWN_ALIAS))
35+
})
36+
3237
const INVALID_MIRROR = 'not_valid_url'

0 commit comments

Comments
 (0)