2246db680e
[Cypress](https://www.cypress.io/) recently went GA with a Component Testing offering which supports Next.js. This PR adds a brief section on what and how to use Cypress for component-level testing and updates the example project with a component test. Any feedback on content or the example is welcome, thanks for considering! ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm build && pnpm lint` - [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
13 lines
220 B
TypeScript
13 lines
220 B
TypeScript
import { defineConfig } from 'cypress'
|
|
|
|
export default defineConfig({
|
|
e2e: {
|
|
baseUrl: 'http://localhost:3000',
|
|
},
|
|
component: {
|
|
devServer: {
|
|
framework: 'next',
|
|
bundler: 'webpack',
|
|
},
|
|
},
|
|
})
|