Skip to content

Commit

Permalink
test: check SEMVER_REGEX export
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed May 25, 2022
1 parent 22ee5c9 commit 189550b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import semverRegex from './index.js';
import semverRegex, {SEMVER_REGEX} from './index.js';
import semver from 'semver';

const fixtures = [
Expand Down Expand Up @@ -172,3 +172,9 @@ test('invalid version does not cause catatrophic backtracking', t => {
t.true(difference < 20, `Execution time: ${difference}`);
}
});

test('SEMVER_REGEX const is exported', t => {
t.regex('0.0.0', SEMVER_REGEX);
t.is(semverRegex().toString(), SEMVER_REGEX.toString());
});

0 comments on commit 189550b

Please sign in to comment.