Skip to content

Commit

Permalink
update test mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJaredWilcurt committed Sep 15, 2019
1 parent 98e9047 commit 0a3b3c2
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,29 @@ const context = require.context('./', true, /\.spec\.ts$/);
context.keys().map(context);

const nw = 'nw';
global[nw] = {
const nwMock = {
process: {
versions: {
nw: '0.39.2',
node: '12.3.1',
chromium: '75.0.3770.90'
nw: '0.40.2',
'nw-flavor': 'sdk',
node: '12.9.1',
chromium: '76.0.3809.132'
}
},
Shell: {
openExternal () {
return undefined;
}
},
Window: {
get () {
return {
showDevTools () {
return undefined;
}
};
}
}
};
global[nw] = nwMock;
window[nw] = nwMock;

0 comments on commit 0a3b3c2

Please sign in to comment.