diff --git a/packages/playground/worker/__tests__/worker.spec.ts b/packages/playground/worker/__tests__/worker.spec.ts index 46b136edd66d2a..f10e6208fb53c3 100644 --- a/packages/playground/worker/__tests__/worker.spec.ts +++ b/packages/playground/worker/__tests__/worker.spec.ts @@ -73,3 +73,11 @@ if (isBuild) { expect(content).toMatch(`window.Blob`) }) } + +test('?worker&url import', async () => { + if (isBuild) { + expect(await page.textContent('.worker-url')).toMatch('/assets/my-worker.') + } else { + expect(await page.textContent('.worker-url')).toMatch('/my-worker.ts?worker_file') + } +}) \ No newline at end of file diff --git a/packages/playground/worker/index.html b/packages/playground/worker/index.html index 1ce429eece42cc..1a6b16a0fcccbf 100644 --- a/packages/playground/worker/index.html +++ b/packages/playground/worker/index.html @@ -19,12 +19,18 @@ 0 +
+ ?worker&url import
+
+