diff --git a/playground/worker/__tests__/es/es-worker.spec.ts b/playground/worker/__tests__/es/es-worker.spec.ts index d9c00892d8f862..3f150578097c75 100644 --- a/playground/worker/__tests__/es/es-worker.spec.ts +++ b/playground/worker/__tests__/es/es-worker.spec.ts @@ -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 () => {