next.js/test/e2e/app-dir/remove-console/remove-console.test.ts
remove-console.test.ts24 lines550 B
import { nextTestSetup } from 'e2e-utils'

describe('remove-console', () => {
  const { next } = nextTestSetup({
    files: __dirname,
  })

  it('should remove console.log', async () => {
    const browser = await next.browser('/')
    expect(await browser.elementByCss('p').text()).toBe('hello client')

    const logs = await browser.log()

    expect(logs).not.toContainEqual({
      source: 'log',
      message: 'MY LOG MESSAGE',
    })
    expect(logs).toContainEqual({
      source: 'error',
      message: 'MY ERROR MESSAGE',
    })
  })
})
Quest for Codev2.0.0
/
SIGN IN