File size: 666 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
import { createNext } from 'e2e-utils'
import { NextInstance } from 'e2e-utils'

describe('ES Check .next output', () => {
  let next: NextInstance
  afterEach(() => next.destroy())

  it('should emit ES2020 with default', async () => {
    next = await createNext({
      files: __dirname,
      dependencies: { 'es-check': '7.0.1' },
      packageJson: {
        scripts: {
          build: 'next build && es-check es2020 ".next/static/**/*.js"',
        },
      },
      installCommand: 'pnpm i',
      buildCommand: 'pnpm build',
    })
    expect(next.cliOutput).toContain(
      'info: ES-Check: there were no ES version matching errors!  🎉'
    )
  })
})