Rename test commands (coverage storybook) (#476)
* Rename test commands * Add coverage command in doc
This commit is contained in:
2
.github/workflows/ci-front.yaml
vendored
2
.github/workflows/ci-front.yaml
vendored
@ -34,7 +34,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
|
cd front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
|
||||||
"npx http-server storybook-static --silent --port 6006" \
|
"npx http-server storybook-static --silent --port 6006" \
|
||||||
"yarn coverage"
|
"yarn coverage-storybook"
|
||||||
- name: Front / Run jest tests
|
- name: Front / Run jest tests
|
||||||
run: |
|
run: |
|
||||||
cd front && yarn test
|
cd front && yarn test
|
||||||
|
|||||||
@ -14,6 +14,7 @@ This will allow you to run Visual Studio on top of the docker container.
|
|||||||
## Front tests
|
## Front tests
|
||||||
|
|
||||||
Run tests: `make front-test`
|
Run tests: `make front-test`
|
||||||
|
Run tests with coverage: `make front-coverage`
|
||||||
|
|
||||||
## Running commands
|
## Running commands
|
||||||
If you are using Docker install, make sure to ssh in the docker container during development to execute commands.
|
If you are using Docker install, make sure to ssh in the docker container during development to execute commands.
|
||||||
|
|||||||
@ -41,11 +41,12 @@
|
|||||||
"start": "PORT=3001 craco start",
|
"start": "PORT=3001 craco start",
|
||||||
"build": "craco build",
|
"build": "craco build",
|
||||||
"test": "craco test",
|
"test": "craco test",
|
||||||
|
"coverage": "craco test --coverage .",
|
||||||
"lint": "eslint src --max-warnings=0",
|
"lint": "eslint src --max-warnings=0",
|
||||||
"storybook": "storybook dev -p 6006 -s ../public",
|
"storybook": "storybook dev -p 6006 -s ../public",
|
||||||
"test-storybook": "test-storybook",
|
"test-storybook": "test-storybook",
|
||||||
"build-storybook": "storybook build -s public",
|
"build-storybook": "storybook build -s public",
|
||||||
"coverage": "test-storybook --coverage && npx nyc report --reporter=lcov -t coverage/storybook --report-dir coverage/storybook --check-coverage",
|
"coverage-storybook": "test-storybook --coverage && npx nyc report --reporter=lcov -t coverage/storybook --report-dir coverage/storybook --check-coverage",
|
||||||
"graphql:generate": "dotenv cross-var graphql-codegen --config codegen.js",
|
"graphql:generate": "dotenv cross-var graphql-codegen --config codegen.js",
|
||||||
"chromatic": "dotenv cross-var npx chromatic --project-token=$CHROMATIC_PROJECT_TOKEN"
|
"chromatic": "dotenv cross-var npx chromatic --project-token=$CHROMATIC_PROJECT_TOKEN"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -23,6 +23,9 @@ front-lint:
|
|||||||
front-test:
|
front-test:
|
||||||
@docker-compose exec twenty-dev sh -c "cd /app/front && yarn test"
|
@docker-compose exec twenty-dev sh -c "cd /app/front && yarn test"
|
||||||
|
|
||||||
|
front-coverage:
|
||||||
|
@docker-compose exec twenty-dev sh -c "cd /app/front && yarn coverage"
|
||||||
|
|
||||||
front-graphql-generate:
|
front-graphql-generate:
|
||||||
@docker-compose exec twenty-dev sh -c "cd /app/front && yarn graphql:generate"
|
@docker-compose exec twenty-dev sh -c "cd /app/front && yarn graphql:generate"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user