From b03ff8c06cd9c65c1205d3b10de9fffebad0cd40 Mon Sep 17 00:00:00 2001 From: Cyrille Derche Date: Sat, 20 May 2023 17:35:37 +0200 Subject: [PATCH] Update test command --- README.md | 5 ++--- docker-compose.test.yml | 8 ++++---- jest.config.ts | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ea628f5..1066d7f 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,12 @@ docker run -e RUN_LOCAL=true -e TYPESCRIPT_DEFAULT_STYLE=prettier -e VALIDATE_DO Note: We have disabled HADOLINT for now as we are getting an error: `qemu: uncaught target signal 11 (Segmentation fault) - core dumped`. - ### Tests The CI Pipeline uses the `test` target from the Dockerfile to run the tests. You can run it locally with the following command: ```bash -docker compose -f docker-compose.test.yml up +docker compose -f docker-compose.test.yml up --exit-code-from app ``` -Note: This will create a /coverage folder where you can review the coverage details. \ No newline at end of file +Note: This will create a /coverage folder where you can review the coverage details. diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 5864ff9..f49b352 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -1,4 +1,4 @@ -version: '3.9' +version: "3.9" services: app: @@ -20,13 +20,13 @@ services: - redis - mongo redis: - image: 'redis:alpine' + image: "redis:alpine" ports: - 6379:6379 mongo: - image: 'mongo' + image: "mongo" ports: - 27017:27017 environment: - MONGO_INITDB_ROOT_USERNAME=root - - MONGO_INITDB_ROOT_PASSWORD=pass \ No newline at end of file + - MONGO_INITDB_ROOT_PASSWORD=pass diff --git a/jest.config.ts b/jest.config.ts index e5fbf09..3abcbd9 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -1,5 +1,5 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', - testEnvironment: 'node' -} + preset: "ts-jest", + testEnvironment: "node", +};