next.js/test/e2e/app-dir/middleware-matching/index.test.ts
index.test.ts18 lines418 B
import { nextTestSetup } from 'e2e-utils'

describe('app dir - middleware with custom matcher', () => {
  const { next, skipped } = nextTestSetup({
    files: __dirname,
    skipDeployment: true,
  })

  if (skipped) {
    return
  }

  it('should match /:id (without asterisk)', async () => {
    const browser = await next.browser('/chat/123')
    expect(await browser.elementByCss('p').text()).toBe('Home')
  })
})
Quest for Codev2.0.0
/
SIGN IN