Add output from a successful test run (#17793)

Add output from a successful test run -- because the error output from a failed test run was presented above
This commit is contained in:
Peter Hauke 2023-07-21 18:48:57 +02:00 committed by GitHub
parent 7c81c527a9
commit 05e462bd2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -122,6 +122,18 @@ Run the command again, and this time rebuild the image to use the new Dockerfile
$ docker compose -f docker-compose.dev.yml run --build notes npm run test
```
When you run the tests this time, you should get the following output:
```console
> mocha ./**/*.js
Array
#indexOf()
✔ should return -1 when the value is not present
1 passing (6ms)
```
This image with dev dependencies installed is not suitable for a production image. Rather than creating multiple Dockerfiles, we can create a multi-stage Dockerfile to create an image for testing and an image for production.
### Multi-stage Dockerfile for testing