diff options
Diffstat (limited to 'cli/tests/subdir')
-rw-r--r-- | cli/tests/subdir/test_worker.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/subdir/test_worker.js b/cli/tests/subdir/test_worker.js index 53d38ba96..cec5bdf9b 100644 --- a/cli/tests/subdir/test_worker.js +++ b/cli/tests/subdir/test_worker.js @@ -1,7 +1,19 @@ +let thrown = false; + onmessage = function(e) { console.log(e.data); + if (thrown === false) { + thrown = true; + throw new SyntaxError("[test error]"); + } + postMessage(e.data); workerClose(); }; + +onerror = function() { + console.log("called onerror in worker"); + return false; +}; |