govuk-frontend icon indicating copy to clipboard operation
govuk-frontend copied to clipboard

Ensure tests run against the review app server

Open romaricpascal opened this issue 1 month ago • 0 comments

What

Have tests check that the server running on port 3000 is actually the review app and either, if not the review app:

  1. prevent tests from running altogether
  2. use a different port for the server and the tests

Choice would depend on the complexity of implementation of 2 and time available. 1. would already provide some us some safety that we run against the right server rather wasting time looking at a flurry of errors.

Why

Before starting a server with the review app, our tests check if anything's running on port 3000. However, they don't check if that server is actually the review app, which may lead to the tests running against another server entirely if the developer has other projects running on their machine (and lots of tests failing). We should make sure tests run against the appropriate server.

Who needs to work on this

Developers

## Who needs to review this

Developers

## Done when

Either

  • [ ] Tests do not start if they don't run against the review app and we created an issue to use a different port later on
  • [ ] Tests use a different port if port 3000 is already used by a project that's not the review app

romaricpascal avatar May 17 '24 13:05 romaricpascal