Skip to content

Commit d8fdba3

Browse files
committed
fix: force esm loading exceptions to be catched by load function
1 parent 4103261 commit d8fdba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/worker/subprocess.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ ipc.options.then(async options => {
138138
for (const extension of extensionsToLoadAsModules) {
139139
if (ref.endsWith(`.${extension}`)) {
140140
try {
141-
return import(ref);
141+
return await import(ref); // eslint-disable-line no-await-in-loop
142142
} catch {}
143143

144144
ipc.send({type: 'internal-error', err: serializeError('Internal runner error', false, new Error('AVA cannot yet load ESM files.'))});

0 commit comments

Comments
 (0)