Skip to content

Commit 23c454e

Browse files
committed
test(benchmark.js): use real root-frame helpers in core mock
The integ test deep-mocks @codspeed/core, so wrapWithRootFrame and wrapWithRootFrameSync returned non-callable mocks once the plugin began wrapping benchmarks through them. Bind both to the actual implementations, matching getGitDir/getCallingFile.
1 parent 94674d4 commit 23c454e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/benchmark.js-plugin/tests/index.integ.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jest.mock("@codspeed/core", () => {
1111
const actual = jest.requireActual("@codspeed/core");
1212
mockCore.getGitDir = actual.getGitDir;
1313
mockCore.getCallingFile = actual.getCallingFile;
14+
mockCore.wrapWithRootFrame = actual.wrapWithRootFrame;
15+
mockCore.wrapWithRootFrameSync = actual.wrapWithRootFrameSync;
1416
return mockCore;
1517
});
1618

0 commit comments

Comments
 (0)