We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
resolveHookRunCount
1 parent d2f2ec0 commit 166ad09Copy full SHA for 166ad09
test/es-module/test-esm-initialization.mjs
@@ -16,8 +16,8 @@ import { spawnSync } from 'node:child_process';
16
{ encoding: 'utf8' },
17
);
18
19
- const resolveHookRunCount = [...(stdout.matchAll(/resolve passthru/g) ?? new Array())]
20
- .length - 1; // less 1 because the first is the needle
+ // Length minus 1 because the first match is the needle.
+ const resolveHookRunCount = (stdout.match(/resolve passthru/g)?.length ?? 0) - 1;
21
22
assert.strictEqual(stderr, '');
23
/**
0 commit comments