File size: 534 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
/* eslint-env jest */

import { fetchViaHTTP, findPort, killApp, launchApp } from 'next-test-utils'
;(process.env.IS_TURBOPACK_TEST ? describe.skip : describe)(
  'babel-next-image',
  () => {
    let appPort
    let app

    beforeAll(async () => {
      appPort = await findPort()
      app = await launchApp(__dirname, appPort)
    })

    afterAll(() => killApp(app))

    it('should work with babel and next/image', async () => {
      const res = await fetchViaHTTP(appPort, '/')
      expect(res.status).toBe(200)
    })
  }
)