File size: 623 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { nextTestSetup } from 'e2e-utils'

describe('Skipped in Turbopack', () => {
  describe('app-dir - optimizePackageImports - basic', () => {
    const { next } = nextTestSetup({
      files: __dirname,
    })

    it('should build successfully', async () => {
      const $ = await next.render$('/')
      expect(await $('#client-mod').text()).toContain('client:default')
    })

    it('should handle mixed imports from barrel optimized lib correctly', async () => {
      const $ = await next.render$('/mixed-barrel-imports')
      expect(await $('#component').attr('style')).toContain('color:blue')
    })
  })
})