Files
Ethan Arrowood 32dcec721f Add next experimental-test command (#64352)
This PR adds a new `experimental-test` command to Next.js CLI.

It has 3 main functions:
- auto installing missing playwright dependencies
- auto generating missing playwright config
- running tests via `playwright test`

I'm currently working on sharing a public RFC that will have more
information. I will link that here when its available.

Closes NEXT-3076 NEXT-3032

---------

Co-authored-by: samcx <sam@vercel.com>
2024-04-24 13:21:29 -06:00

7 lines
194 B
JavaScript

const { test, expect } = require('next/experimental/testmode/playwright')
test('home page', async ({ page }) => {
await page.goto('/')
await expect(page.getByText('Home')).toBeVisible()
})