Skip to content

Commit

Permalink
Try loading worker from absolute URL in webpack tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andywer committed Sep 7, 2019
1 parent 4c2c192 commit 81e6410
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/webpack/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,17 @@ async function test2() {
}
}

async function test3() {
const hello = await spawn<HelloWorker>(new Worker("https://gist.githubusercontent.com/andywer/f5572520b103e0673204e3d11cd20404/raw/489a9c717f2acd1aecb7b7945d1695f583521cf5/hello-worker.js"))
const result = await hello("World")

if (result !== "Hello, World") {
throw Error("Unexpected result returned by hello worker: " + result)
}
}

export default () => Promise.all([
test(),
test2()
test2(),
test3()
])

0 comments on commit 81e6410

Please sign in to comment.