Skip to content

Commit

Permalink
Fixed config file detection when ES custom loaders (--loader=) are used
Browse files Browse the repository at this point in the history
  • Loading branch information
sgravrock committed Jun 19, 2023
1 parent f678a08 commit 2689181
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/runner_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ class RunnerBase {
try {
await this.loadSpecificConfigFile_(`spec/support/jasmine.${ext}`);
} catch (e) {
if (e.code !== 'MODULE_NOT_FOUND' && e.code !== 'ERR_MODULE_NOT_FOUND') {
if (e.code !== 'MODULE_NOT_FOUND' // CommonJS
&& e.code !== 'ERR_MODULE_NOT_FOUND' // ESM
&& e.code !== 'ENOENT') { // ESM w/custom loader
throw e;
}
}
Expand Down

0 comments on commit 2689181

Please sign in to comment.