diff options
Diffstat (limited to 'cli/tests/subdir/test_worker.js')
-rw-r--r-- | cli/tests/subdir/test_worker.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/tests/subdir/test_worker.js b/cli/tests/subdir/test_worker.js index cec5bdf9b..f0d9fbed6 100644 --- a/cli/tests/subdir/test_worker.js +++ b/cli/tests/subdir/test_worker.js @@ -1,5 +1,10 @@ let thrown = false; +// TODO(bartlomieju): add test for throwing in web worker +if (self.name !== "jsWorker") { + throw Error(`Bad worker name: ${self.name}, expected jsWorker`); +} + onmessage = function(e) { console.log(e.data); @@ -10,7 +15,7 @@ onmessage = function(e) { postMessage(e.data); - workerClose(); + close(); }; onerror = function() { |