mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
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 <[email protected]>
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()
|
|
})
|