mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
32dcec721f
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>
7 lines
194 B
JavaScript
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()
|
|
})
|