Skip to content

Commit 91cb11b

Browse files
committed
fix: add invoke method to window.__TAURI_INTERNALS__ mock
1 parent 31363db commit 91cb11b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jest.setup.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ require('@testing-library/jest-dom')
22

33
// Mock Tauri API
44
global.window = global.window || {};
5-
global.window.__TAURI_INTERNALS__ = {};
5+
global.window.__TAURI_INTERNALS__ = {
6+
invoke: jest.fn()
7+
};
68
global.window.isTauri = true;
79

810
// Mock Tauri invoke function

0 commit comments

Comments
 (0)