Skip to content

Commit

Permalink
skip a test that's irrelevant to this experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
lubieowoce committed Apr 24, 2024
1 parent 0ca4a9a commit 975e322
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/e2e/app-dir/app-external/app-external.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ createNextDescribe(
buildCommand: 'pnpm build',
skipDeployment: true,
},
({ next }) => {
({ next, isTurbopack }) => {
it('should be able to opt-out 3rd party packages being bundled in server components', async () => {
await next.fetch('/react-server/optout').then(async (response) => {
const result = await resolveStreamResponse(response)
Expand Down Expand Up @@ -284,13 +284,18 @@ createNextDescribe(
})

describe('server actions', () => {
it('should not prefer to resolve esm over cjs for bundling optout packages', async () => {
// not sure if turbopack (seemingly?) preferring ESM s correct, but it's irrelevant to this branch
const itNonTurbo = isTurbopack ? it.skip : it
// prettier-ignore
itNonTurbo('should not prefer to resolve esm over cjs for bundling optout packages', async () => {
const browser = await next.browser('/optout/action')
// eslint-disable-next-line jest/no-standalone-expect
expect(await browser.elementByCss('#dual-pkg-outout p').text()).toBe('')

browser.elementByCss('#dual-pkg-outout button').click()
await check(async () => {
const text = await browser.elementByCss('#dual-pkg-outout p').text()
// eslint-disable-next-line jest/no-standalone-expect
expect(text).toBe('dual-pkg-optout:cjs')
return 'success'
}, /success/)
Expand Down

0 comments on commit 975e322

Please sign in to comment.