Skip to content

Commit eec5af0

Browse files
author
Benjamin Pasero
committed
debt - bail out on some window methods in tests
1 parent a62ea90 commit eec5af0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/electron/renderer.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
// windows. This we cannot allow as it may crash
2020
// the test run.
2121
// !!! DO NOT CHANGE !!!
22-
window.open = function () {return null;};
23-
window.alert = function () {}
24-
window.confirm = function () {}
22+
window.open = function () { throw new Error('window.open() is not supported in tests!'); };
23+
window.alert = function () { throw new Error('window.alert() is not supported in tests!'); }
24+
window.confirm = function () { throw new Error('window.confirm() is not supported in tests!'); }
2525

2626
mocha.setup({
2727
ui: 'tdd',

0 commit comments

Comments
 (0)