From 268918195ca53b401961172d6bb563e93852cc5f Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Mon, 19 Jun 2023 11:27:37 -0700 Subject: [PATCH] Fixed config file detection when ES custom loaders (--loader=) are used --- lib/runner_base.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/runner_base.js b/lib/runner_base.js index 4ea2d05..bafa12e 100644 --- a/lib/runner_base.js +++ b/lib/runner_base.js @@ -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; } }