Skip to content

Commit

Permalink
Further simplify an inefficient regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadKillingsworth committed Jan 12, 2023
1 parent 1bf6c23 commit d89a8f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ const Semver = require('semver');
const spawn = require('child_process').spawnSync;
require('mocha');

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

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

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

Expand Down

0 comments on commit d89a8f0

Please sign in to comment.