Skip to content

Commit

Permalink
test: add more
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Mar 9, 2023
1 parent 8ad13b2 commit 2746454
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion playground/worker/__tests__/es/es-worker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,16 @@ describe.runIf(isBuild)('build', () => {
// chunk
expect(content).toMatch(`new Worker("/es/assets`)
expect(content).toMatch(`new SharedWorker("/es/assets`)
// inlined
// inlined worker
expect(content).toMatch(`(window.URL||window.webkitURL).createObjectURL`)
expect(content).toMatch(`window.Blob`)
expect(content).toMatch(
/try\{return .*\?new Worker\(.+\):new Worker\("data:application\/javascript;base64,"\+/,
)
// inlined shared worker
expect(content).toMatch(
`return new SharedWorker("data:application/javascript;base64,"+`,
)
})

test('worker emitted and import.meta.url in nested worker (build)', async () => {
Expand Down

0 comments on commit 2746454

Please sign in to comment.