From 2746454f71e83d30b91308df61c687c03df02a8f Mon Sep 17 00:00:00 2001 From: fi3ework Date: Thu, 9 Mar 2023 02:07:03 +0800 Subject: [PATCH] test: add more --- playground/worker/__tests__/es/es-worker.spec.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 () => {