File size: 661 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { join } from 'path'
import { nextTestSetup } from 'e2e-utils'
import { assertNoRedbox } from 'next-test-utils'

describe('optimizePackageImports - mui', () => {
  const { next } = nextTestSetup({
    env: {
      NEXT_TEST_MODE: '1',
    },
    files: join(__dirname, 'fixture-tremor'),

    dependencies: {
      '@headlessui/react': '^1.7.18',
      '@headlessui/tailwindcss': '^0.2.0',
      '@remixicon/react': '^4.2.0',
      '@tremor/react': '^3.14.1',
    },
  })

  it('should work', async () => {
    // Without barrel optimization, the reproduction breaks.
    const browser = await next.browser('/')
    await assertNoRedbox(browser)
  })
})