Skip to content

Commit dc5f3d2

Browse files
author
Marc Littlemore
committed
docs: update with PR changes
1 parent 9ba9da0 commit dc5f3d2

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,29 @@ Then run the tests:
170170
npm test
171171
```
172172

173-
In order to run the end-to-end (E2E) tests, you'll need to 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).
173+
### End-to-end tests
174174

175-
Then run the E2E tests:
175+
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:
176176

177177
```shell
178-
NETLIFY_AUTH_TOKEN=your-token-here npm test:next
178+
netlify login
179179
```
180180

181+
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).
181182

183+
Then run the E2E tests if logged in:
184+
185+
```shell
186+
npm run test:next
187+
```
188+
189+
Or if using an access token:
190+
191+
```shell
192+
NETLIFY_AUTH_TOKEN=your-token-here npm run test:next
193+
```
194+
195+
_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._
182196
## Feedback
183197

184198
If you think you have found a bug in Next.js on Netlify,

0 commit comments

Comments
 (0)