mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
fix: type annotate overlay runtime test mock callbacks
This commit is contained in:
@@ -75,7 +75,7 @@ function createMockWindow(): MockWindow & {
|
|||||||
webContents: {
|
webContents: {
|
||||||
isLoading: () => state.loading,
|
isLoading: () => state.loading,
|
||||||
getURL: () => state.url,
|
getURL: () => state.url,
|
||||||
send: (channel, payload) => {
|
send: (channel: string, payload?: unknown) => {
|
||||||
if (payload === undefined) {
|
if (payload === undefined) {
|
||||||
state.sent.push([channel]);
|
state.sent.push([channel]);
|
||||||
return;
|
return;
|
||||||
@@ -84,7 +84,7 @@ function createMockWindow(): MockWindow & {
|
|||||||
},
|
},
|
||||||
focused: false,
|
focused: false,
|
||||||
isFocused: () => state.webContentsFocused,
|
isFocused: () => state.webContentsFocused,
|
||||||
once: (_event, cb) => {
|
once: (_event: 'did-finish-load', cb: () => void) => {
|
||||||
state.loadCallbacks.push(cb);
|
state.loadCallbacks.push(cb);
|
||||||
},
|
},
|
||||||
focus: () => {
|
focus: () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user