Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update yarn test command #148

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Another example [here](https://co-pilot.dev/changelog)
- Add voyage project submission controller, service, e2e tests, responses seed ([#133](https://github.com/chingu-x/chingu-dashboard-be/pull/133))
- Add new endpoints to select/reset team project ideation ([#136](https://github.com/chingu-x/chingu-dashboard-be/pull/136))
- Add CASL ability for Access control ([#141](https://github.com/chingu-x/chingu-dashboard-be/pull/141))
- new command to run both e2e and unit test ([#148](https://github.com/chingu-x/chingu-dashboard-be/pull/148))

### Changed

Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ $ yarn start:prod
## Test<a name="tests"></a>

```bash
# all tests (unit and e2e for now)
$ yarn test

# unit tests
$ yarn test
$ yarn test:unit

# e2e tests
$ yarn test:e2e
Expand All @@ -96,8 +99,11 @@ $ yarn test:cov

If using the docker terminal the commands would be
```bash
# all tests (unit and e2e for now)
$ yarn test:docker

# unit tests
$ yarn test:docker
$ yarn test:unit:docker

# e2e tests
$ yarn test:e2e:docker
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"studio:test:docker": "dotenv -v DATABASE_URL=postgresql://chingu:chingu@postgres-test:5434/dashboard?schema=public prisma studio",
"seed": "prisma db seed",
"lint": "eslint \"{prisma/*seed,src,test}/**/*.ts\" --fix",
"test": "dotenv -e ./.env.test jest",
"test:docker": "dotenv -v NODE_ENV=test -v DATABASE_URL=postgresql://chingu:chingu@postgres-test:5434/dashboard?schema=public jest",
"test:unit": "dotenv -e ./.env.test jest",
"test:unit:docker": "dotenv -v NODE_ENV=test -v DATABASE_URL=postgresql://chingu:chingu@postgres-test:5434/dashboard?schema=public jest",
"test:watch": "dotenv -e ./.env.test jest --watch",
"test:watch:docker": "dotenv -v NODE_ENV=test -v DATABASE_URL=postgresql://chingu:chingu@postgres-test:5434/dashboard?schema=public jest --watch",
"test:cov": "dotenv -e ./.env.test jest --coverage",
Expand All @@ -37,7 +37,9 @@
"test:int": "dotenv -e ./.env.test -- jest -i --no-cache --verbose --config ./test/jest-int.json",
"test:int:docker": "dotenv -v NODE_ENV=test -v DATABASE_URL=postgresql://chingu:chingu@postgres-test:5434/dashboard?schema=public -- jest -i --no-cache --verbose --config ./test/jest-int.json",
"test:e2e": "dotenv -e ./.env.test -- jest --config ./test/jest-e2e.json --runInBand",
"test:e2e:docker": "dotenv -v NODE_ENV=test -v DATABASE_URL=postgresql://chingu:chingu@postgres-test:5434/dashboard?schema=public -- jest --config ./test/jest-e2e.json --runInBand"
"test:e2e:docker": "dotenv -v NODE_ENV=test -v DATABASE_URL=postgresql://chingu:chingu@postgres-test:5434/dashboard?schema=public -- jest --config ./test/jest-e2e.json --runInBand",
"test:docker": "yarn test:e2e:docker --silent && yarn test:unit:docker --silent",
"test": "yarn test:e2e --silent && yarn test:unit --silent"
},
"dependencies": {
"@casl/ability": "^6.7.1",
Expand Down
Loading