Skip to content

Commit

Permalink
☕️: make isMochaTestLoad() work with empty modules
Browse files Browse the repository at this point in the history
  • Loading branch information
merryman authored and linusha committed Dec 13, 2023
1 parent 14da305 commit cca1ff2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mocha-es6/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export function uninstallSystemInstantiateHook () {
}

export async function isMochaTestLoad (load, executable) {
let deps = executable.dependencies || [];
let deps = executable?.dependencies || [];
if (!deps.some(ea => ea.endsWith('mocha-es6') || ea.endsWith('mocha-es6/index.js'))) { return false; }

let moduleName = load.name;
Expand Down

0 comments on commit cca1ff2

Please sign in to comment.