next.js/test/e2e/app-dir/next-config-ts-native-ts/async-function/async-function-esm.test.ts
async-function-esm.test.ts22 lines590 B
import { nextTestSetup } from 'e2e-utils'

describe('next-config-ts-async-function-esm', () => {
  // TODO: Remove this once we bump minimum Node.js version to v22
  if (!(process.features as any).typescript) {
    it.skip('requires `process.features.typescript` to feature detect Node.js native TS', () => {})
    return
  }

  const { next } = nextTestSetup({
    files: __dirname,
    packageJson: {
      type: 'module',
    },
  })

  it('should support config as async function (ESM)', async () => {
    const $ = await next.render$('/')
    expect($('p').text()).toBe('foo')
  })
})
Quest for Codev2.0.0
/
SIGN IN