feat(tests): harmonize and clean-up yarn test commands convention (#3695)

## What

Harmonize and clean-up yarn test commands convention.

## Why

Current strategy to filter integration tests from unit tests was cumbersome to maintain. Also, some packages declared `test:unit` which ended up being an alias to `test`.

## How

* Remove all occurrences of `test:unit`
* Rename all `test` commands under `/integration-tests/**/package.json` to `test:integration`
* In the root `package.json`, rewrite `test:integration` command to run `turbo run test:integration`
* In the root `package.json`, remove filtering on the `test` command
* Introduce a new `test:integration` task in the Turborepo config.
This commit is contained in:
Patrick
2023-04-04 09:47:54 -04:00
committed by GitHub
parent 4bb1f833b1
commit 089f1eb19e
18 changed files with 31 additions and 31 deletions

View File

@@ -70,11 +70,11 @@
"lint:docs": "eslint -c docs/.eslintrc.js --ignore-path docs/.eslintignore docs/content",
"prettier": "prettier",
"jest": "jest",
"test": "turbo run test --no-daemon --filter=!integration-tests-api --filter=!integration-tests-plugins --filter=!integration-tests-repositories",
"test:integration": "turbo run test --no-daemon --filter=integration-tests-api --filter=integration-tests-plugins --filter=integration-tests-repositories",
"test:integration:api": "turbo run test --no-daemon --filter=integration-tests-api",
"test:integration:plugins": "turbo run test --no-daemon --filter=integration-tests-plugins",
"test:integration:repositories": "turbo run test --no-daemon --filter=integration-tests-repositories",
"test": "turbo run test --no-daemon",
"test:integration": "turbo run test:integration --no-daemon",
"test:integration:api": "turbo run test:integration --no-daemon --filter=integration-tests-api",
"test:integration:plugins": "turbo run test:integration --no-daemon --filter=integration-tests-plugins",
"test:integration:repositories": "turbo run test:integration --no-daemon --filter=integration-tests-repositories",
"openapi:generate": "yarn ./packages/oas/oas-github-ci run ci",
"medusa-oas": "yarn ./packages/oas/medusa-oas-cli run medusa-oas",
"generate:services": "typedoc --options typedoc.services.js",