You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38
Original file line number
Diff line number
Diff line change
@@ -174,6 +174,44 @@ If your site uses pnpm to manage dependencies, currently you must
174
174
public-hoist-pattern[]=*
175
175
```
176
176
177
+
## Running the tests
178
+
179
+
To run the tests, ensure that the dependencies are installed as follows:
180
+
181
+
```shell
182
+
npm install
183
+
```
184
+
185
+
Then run the tests:
186
+
187
+
```shell
188
+
npm test
189
+
```
190
+
191
+
### End-to-end tests
192
+
193
+
In order to run the end-to-end (E2E) tests, you'll need to be logged in to Netlify. You can do this using the [Netlify CLI](https://github.com/netlify/cli) with the command:
194
+
195
+
```shell
196
+
netlify login
197
+
```
198
+
199
+
Alternatively, you can set an environment variable `NETLIFY_AUTH_TOKEN` to a valid Netlify personal access token. This can be obtained from the [Netlify UI](https://docs.netlify.com/cli/get-started/#obtain-a-token-in-the-netlify-ui).
200
+
201
+
Then run the E2E tests if logged in:
202
+
203
+
```shell
204
+
npm run test:next
205
+
```
206
+
207
+
Or if using an access token:
208
+
209
+
```shell
210
+
NETLIFY_AUTH_TOKEN=your-token-here npm run test:next
211
+
```
212
+
213
+
_Note: The E2E tests will be deployed to a Netlify owned site. To deploy to your own site then set the environment variable `NETLIFY_SITE_ID` to your site ID._
214
+
177
215
## Feedback
178
216
179
217
If you think you have found a bug in Next.js on Netlify,
0 commit comments