[WIP] refactor js operator runtime #5833
Annotations
2 errors
Run:
app/packages/operators/src/runtime/hooks/useCurrentSample.ts#L13
Error: [vitest] No "currentSampleId" export is defined on the "@fiftyone/state" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock("@fiftyone/state", async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ Module.useCurrentSample [as default] packages/operators/src/runtime/hooks/useCurrentSample.ts:13:52
❯ Module.useExecutionContext [as default] packages/operators/src/runtime/hooks/useExecutionContext.ts:20:25
❯ __vi_import_1__.renderHook.wrapper.children.children packages/operators/src/runtime/hooks/useExectuionContext.test.tsx:22:13
❯ TestComponent node_modules/@testing-library/react/dist/pure.js:299:27
❯ renderWithHooks node_modules/react-dom/cjs/react-dom.development.js:16305:18
❯ mountIndeterminateComponent node_modules/react-dom/cjs/react-dom.development.js:20074:13
❯ beginWork node_modules/react-dom/cjs/react-dom.development.js:21587:16
❯ beginWork$1 node_modules/react-dom/cjs/react-dom.development.js:27426:14
|
Run
Process completed with exit code 1.
|
Loading