Skip to content

Commit 2689181

Browse files
committed
Fixed config file detection when ES custom loaders (--loader=) are used
1 parent f678a08 commit 2689181

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/runner_base.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ class RunnerBase {
8282
try {
8383
await this.loadSpecificConfigFile_(`spec/support/jasmine.${ext}`);
8484
} catch (e) {
85-
if (e.code !== 'MODULE_NOT_FOUND' && e.code !== 'ERR_MODULE_NOT_FOUND') {
85+
if (e.code !== 'MODULE_NOT_FOUND' // CommonJS
86+
&& e.code !== 'ERR_MODULE_NOT_FOUND' // ESM
87+
&& e.code !== 'ENOENT') { // ESM w/custom loader
8688
throw e;
8789
}
8890
}

0 commit comments

Comments
 (0)