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

Commit d89a8f0

Browse files
Further simplify an inefficient regular expression
1 parent 1bf6c23 commit d89a8f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/compiler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ const Semver = require('semver');
3030
const spawn = require('child_process').spawnSync;
3131
require('mocha');
3232

33-
const compilerVersionMatch = /^Version: v(\d+)(?:[-\.][a-z0-9][-a-z0-9]*)*$/m;
33+
const compilerVersionMatch = /^Version: v(\d+)$/m;
3434

3535
process.on('unhandledRejection', e => { throw e; });
3636

3737
const assertError = new should.Assertion('compiler version');
3838
assertError.params = {
39-
operator: 'should be a semver parseabe',
39+
operator: 'should be a semver parseable',
4040
};
4141
const isNightlyBuild = /^true|1$/i.test(process.env.COMPILER_NIGHTLY);
4242

0 commit comments

Comments
 (0)