Skip to content

Commit

Permalink
enable turbopack test
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Apr 14, 2024
1 parent 0e8fffe commit 708ec7f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 42 deletions.
34 changes: 15 additions & 19 deletions test/production/app-dir/barrel-optimization/basic/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import { createNextDescribe } from 'e2e-utils'

// Skipped in Turbopack, will be added later.
;(process.env.TURBOPACK ? describe.skip : describe)(
'Skipped in Turbopack',
() => {
createNextDescribe(
'app-dir - optimizePackageImports - basic',
{
files: __dirname,
},
({ next }) => {
it('should build successfully', async () => {
// Ensure that MUI is working
const $ = await next.render$('/')
expect(await $('#client-mod').text()).toContain('client:default')
})
}
)
}
)
describe('Skipped in Turbopack', () => {
createNextDescribe(
'app-dir - optimizePackageImports - basic',
{
files: __dirname,
},
({ next }) => {
it('should build successfully', async () => {
// Ensure that MUI is working
const $ = await next.render$('/')
expect(await $('#client-mod').text()).toContain('client:default')
})
}
)
})
42 changes: 19 additions & 23 deletions test/production/app-dir/barrel-optimization/mui/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
import { createNextDescribe } from 'e2e-utils'

// Skipped in Turbopack, will be added later.
;(process.env.TURBOPACK ? describe.skip : describe)(
'Skipped in Turbopack',
() => {
createNextDescribe(
'app-dir - optimizePackageImports - mui',
{
files: __dirname,
describe('Skipped in Turbopack', () => {
createNextDescribe(
'app-dir - optimizePackageImports - mui',
{
files: __dirname,

dependencies: {
'@mui/material': '5.15.15',
'@emotion/react': '11.11.1',
'@emotion/styled': '11.11.0',
},
dependencies: {
'@mui/material': '5.15.15',
'@emotion/react': '11.11.1',
'@emotion/styled': '11.11.0',
},
({ next }) => {
it('should build successfully', async () => {
// Ensure that MUI is working
const $ = await next.render$('/')
expect(await $('#typography').text()).toContain('typography')
})
}
)
}
)
},
({ next }) => {
it('should build successfully', async () => {
// Ensure that MUI is working
const $ = await next.render$('/')
expect(await $('#typography').text()).toContain('typography')
})
}
)
})

0 comments on commit 708ec7f

Please sign in to comment.