Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test: use regexp to check missing module message
  • Loading branch information
pvdlg committed Jun 25, 2019
1 parent 52c48be commit 01a0b2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/get-config.test.js
Expand Up @@ -482,6 +482,6 @@ test('Throw an Error if one of the shareable config cannot be found', async t =>

const error = await t.throwsAsync(t.context.getConfig({cwd}), Error);

t.is(error.message, "Cannot find module 'non-existing-path'");
t.regex(error.message, /Cannot find module 'non-existing-path'/);
t.is(error.code, 'MODULE_NOT_FOUND');
});
2 changes: 1 addition & 1 deletion test/plugins/normalize.test.js
Expand Up @@ -255,6 +255,6 @@ test('Throws an error if the plugin is not found', t => {
Error
);

t.is(error.message, "Cannot find module 'non-existing-path'");
t.regex(error.message, /Cannot find module 'non-existing-path'/);
t.is(error.code, 'MODULE_NOT_FOUND');
});

0 comments on commit 01a0b2d

Please sign in to comment.