Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit d5c479b

Browse files
committed
Add test for error scenarios
1 parent ea6e4ff commit d5c479b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/test-errors.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// require modules
2+
/** @type {import('ava').TestInterface} */
3+
const test = require('ava');
4+
const versionCheck = require('../');
5+
6+
test('fails when trying to exclude pre-releases in the graphql call', async t => {
7+
await t.throwsAsync(async () => {
8+
await versionCheck({
9+
token: 'hello there',
10+
owner: 'axelrindle',
11+
repo: 'github-version-checker',
12+
currentVersion: '0.0.1',
13+
excludePrereleases: true
14+
});
15+
});
16+
});

0 commit comments

Comments
 (0)