(numTaps, kind)
| 15 | const { AsyncSeriesHook } = tapable; |
| 16 | |
| 17 | function makeHook(numTaps, kind) { |
| 18 | const hook = new AsyncSeriesHook(["a"]); |
| 19 | for (let i = 0; i < numTaps; i++) { |
| 20 | const name = `plugin-${i}`; |
| 21 | if (kind === "sync") { |
| 22 | hook.tap(name, () => {}); |
| 23 | } else if (kind === "async") { |
| 24 | hook.tapAsync(name, (_a, cb) => cb()); |
| 25 | } else if (kind === "promise") { |
| 26 | hook.tapPromise(name, () => Promise.resolve()); |
| 27 | } |
| 28 | } |
| 29 | hook.callAsync(1, () => {}); |
| 30 | return hook; |
| 31 | } |
| 32 | |
| 33 | const INNER_ITERATIONS = 200; |
| 34 |
no test coverage detected
searching dependent graphs…