mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
test(session): isolate runtime prewarm side effect
This commit is contained in:
@@ -15,6 +15,19 @@ vi.mock('../../../../core/dispatch-resolve.ts', async (importOriginal) => {
|
||||
};
|
||||
});
|
||||
vi.mock('../../../device-ready.ts', () => ({ ensureDeviceReady: vi.fn(async () => {}) }));
|
||||
vi.mock('../../../../platform-runtime-apple-application-tools.ts', async (importOriginal) => {
|
||||
const actual =
|
||||
await importOriginal<
|
||||
typeof import('../../../../platform-runtime-apple-application-tools.ts')
|
||||
>();
|
||||
return {
|
||||
...actual,
|
||||
createAppleApplicationTools: () => ({
|
||||
...actual.createAppleApplicationTools(),
|
||||
prewarmRunnerSession: vi.fn(async () => {}),
|
||||
}),
|
||||
};
|
||||
});
|
||||
vi.mock('../../../../platform-runtime-runtime-hints.ts', async (importOriginal) => {
|
||||
const actual =
|
||||
await importOriginal<typeof import('../../../../platform-runtime-runtime-hints.ts')>();
|
||||
|
||||
Reference in New Issue
Block a user