Skip to content

Commit ef792a6

Browse files
committed
Do not test against exact value
1 parent 26ce383 commit ef792a6

File tree

1 file changed

+2
-1
lines changed
  • lib/node_modules/@stdlib/error/tools/pkg2id/test

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/error/tools/pkg2id/test/test.cli.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ var readFileSync = require( '@stdlib/fs/read-file' ).sync;
3131

3232
// VARIABLES //
3333

34+
var RE_ID_FORMAT = /^[a-zA-Z0-9]{3}\r?\n$/;
3435
var fpath = resolve( __dirname, '..', 'bin', 'cli' );
3536
var opts = {
3637
'skip': IS_BROWSER || IS_WINDOWS
@@ -154,7 +155,7 @@ tape( 'the command-line interface prints an error identifier prefix', opts, func
154155
if ( error ) {
155156
t.fail( error.message );
156157
} else {
157-
t.strictEqual( stdout.toString(), '0YK\n', 'prints expected value' );
158+
t.strictEqual( RE_ID_FORMAT.test( stdout.toString() ), true, 'prints expected value' );
158159
t.strictEqual( stderr.toString(), '', 'does not print to `stderr`' );
159160
}
160161
t.end();

0 commit comments

Comments
 (0)