From fa6d5340b170e53548c3c97bd86240e23764163a Mon Sep 17 00:00:00 2001 From: lsdsjy Date: Tue, 21 Nov 2023 18:19:25 +0800 Subject: [PATCH] chore: test --- playground/legacy/__tests__/legacy.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playground/legacy/__tests__/legacy.spec.ts b/playground/legacy/__tests__/legacy.spec.ts index b90b3e09c8aad4..b0cc061b289d6c 100644 --- a/playground/legacy/__tests__/legacy.spec.ts +++ b/playground/legacy/__tests__/legacy.spec.ts @@ -152,10 +152,12 @@ describe.runIf(isBuild)('build', () => { ).toBeFalsy() }) - test('should have only entry files guarded', async () => { + test('should have only modern entry files guarded', async () => { const guard = /(import\s*\()|(import.meta)|(async\s*function\*)/ expect(findAssetFile(/index(?!-legacy)/)).toMatch(guard) expect(findAssetFile(/polyfills(?!-legacy)/)).toMatch(guard) + + expect(findAssetFile(/chunk-async(?!-legacy)/)).not.toMatch(guard) expect(findAssetFile(/index-legacy/)).not.toMatch(guard) }) })