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 13:47:54 +00:00
committed by GitHub
parent 4bb1f833b1
commit 089f1eb19e
18 changed files with 31 additions and 31 deletions
+1 -2
View File
@@ -27,8 +27,7 @@
"watch": "tsc --build --watch",
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "tsc --build",
"test": "jest --passWithNoTests",
"test:unit": "jest --passWithNoTests"
"test": "jest --passWithNoTests"
},
"dependencies": {
"@medusajs/modules-sdk": "0.1.0-rc.4"
+1 -2
View File
@@ -27,8 +27,7 @@
"watch": "tsc --build --watch",
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "tsc --build",
"test": "jest --passWithNoTests",
"test:unit": "jest --passWithNoTests"
"test": "jest --passWithNoTests"
},
"dependencies": {
"@medusajs/modules-sdk": "0.1.0-rc.4",
+1 -2
View File
@@ -27,8 +27,7 @@
"watch": "tsc --build --watch",
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "tsc --build",
"test": "jest --passWithNoTests",
"test:unit": "jest --passWithNoTests"
"test": "jest --passWithNoTests"
},
"dependencies": {
"@medusajs/modules-sdk": "0.1.0-rc.4",
+1 -2
View File
@@ -28,8 +28,7 @@
"watch": "tsc --build --watch",
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "tsc --build",
"test": "jest --passWithNoTests",
"test:unit": "jest --passWithNoTests"
"test": "jest --passWithNoTests"
},
"dependencies": {
"@medusajs/modules-sdk": "0.1.0-rc.4",
+1 -2
View File
@@ -33,7 +33,6 @@
"watch": "tsc --build --watch",
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "tsc --build",
"test": "jest --passWithNoTests",
"test:unit": "jest --passWithNoTests"
"test": "jest --passWithNoTests"
}
}
+1 -2
View File
@@ -35,8 +35,7 @@
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "tsc --build",
"serve": "node dist/app.js",
"test": "jest",
"test:unit": "jest"
"test": "jest"
},
"peerDependencies": {
"@medusajs/types": "0.0.2-rc.1",
+1 -2
View File
@@ -33,7 +33,6 @@
"scripts": {
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "tsc --build",
"test": "jest",
"test:unit": "jest"
"test": "jest"
}
}
+1 -2
View File
@@ -32,8 +32,7 @@
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "tsc --build",
"medusa-oas": "ts-node src/index.ts",
"test": "jest src",
"test:unit": "jest src"
"test": "jest src"
},
"dependencies": {
"@medusajs/medusa": "1.8.0-rc.6",
+1 -2
View File
@@ -18,8 +18,7 @@
"ci": "node scripts/build-openapi.js",
"preview:admin": "yarn redocly preview-docs ../../../docs/api/admin/openapi.yaml --config=../../../docs-util/redocly/config.yaml",
"preview:store": "yarn redocly preview-docs ../../../docs/api/store/openapi.yaml --config=../../../docs-util/redocly/config.yaml",
"test": "jest --passWithNoTests",
"test:unit": "jest --passWithNoTests"
"test": "jest --passWithNoTests"
},
"dependencies": {
"@medusajs/medusa-oas-cli": "0.2.0-rc.6",
@@ -22,8 +22,7 @@
"prepare": "cross-env NODE_ENV=production yarn run release",
"build": "rollup --config --environment NODE_ENV:development",
"release": "rollup --config --environment NODE_ENV:production",
"test": "jest --passWithNoTests",
"test:unit": "jest --passWithNoTests"
"test": "jest --passWithNoTests"
},
"dependencies": {
"camelcase": "^6.3.0",
+1 -2
View File
@@ -33,7 +33,6 @@
"watch": "tsc --build --watch",
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "tsc --build",
"test": "jest --passWithNoTests",
"test:unit": "jest --passWithNoTests"
"test": "jest --passWithNoTests"
}
}