Skip to content

Commit

Permalink
chore: test
Browse files Browse the repository at this point in the history
  • Loading branch information
lsdsjy committed Nov 21, 2023
1 parent c326e1a commit fa6d534
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion playground/legacy/__tests__/legacy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
})

0 comments on commit fa6d534

Please sign in to comment.