Skip to content

Commit

Permalink
Update unit test to support turbo's different file path
Browse files Browse the repository at this point in the history
  • Loading branch information
bgw committed May 2, 2024
1 parent 2b13b51 commit 85f5607
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/e2e/app-dir/app/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ describe('app dir - basic', () => {
it('should serve polyfills for browsers that do not support modules', async () => {
const html = await next.render('/dashboard/index')
expect(html).toMatch(
/<script src="\/_next\/static\/chunks\/polyfills(-\w+)?\.js" noModule="">/
isTurbopack
? /<script src="\/_next\/static\/chunks\/[\w-]*polyfill-nomodule\.js" noModule="">/
: /<script src="\/_next\/static\/chunks\/polyfills(-\w+)?\.js" noModule="">/
)
})
}
Expand Down

0 comments on commit 85f5607

Please sign in to comment.