Skip to content

Commit

Permalink
fix mocha execution
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTugarev committed Sep 19, 2023
1 parent 8870188 commit f9cd0de
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 33 deletions.
9 changes: 3 additions & 6 deletions components/gitpod-db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "yarn db-test",
"watch": "leeway exec --package .:lib --transitive-dependencies --filter-type yarn --components --parallel -- tsc -w --preserveWatchOutput",
"db-test": "r(){ . $(leeway run components/gitpod-db:db-test-env); yarn db-test-run; };r",
"db-test-run": "mocha '**/*.spec.db.ts' --exclude './node_modules/**'",
"db-test-run": "mocha '**/*.spec.db.ts' --exclude './node_modules/**' --exit",
"wait-for-db": "node ./lib/wait-for-db.js",
"typeorm": "typeorm -f lib/typeorm/ormconfig",
"migrate-migrations": "node ./lib/migrate-migrations.js",
Expand All @@ -26,13 +26,10 @@
"reflect-metadata/Reflect",
"source-map-support/register"
],
"spec": [
"src/**/*.spec.ts",
"src/**/*.spec.db.ts"
],
"extensions": [
"ts"
]
],
"exit": true
},
"files": [
"/lib"
Expand Down
8 changes: 3 additions & 5 deletions components/gitpod-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"lint": "yarn eslint src/*.ts src/**/*.ts",
"lint:fix": "yarn eslint src/*.ts src/**/*.ts --fix",
"test": "mocha './**/*.spec.ts' --exclude './node_modules/**'",
"test-debug": "mocha --inspect-brk './**/*.spec.ts' --exclude './node_modules/**'",
"test-debug": "mocha --inspect-brk './**/*.spec.ts' --exclude './node_modules/**' --exit",
"watch": "leeway exec --package .:lib --transitive-dependencies --filter-type yarn --components --parallel -- tsc -w --preserveWatchOutput"
},
"mocha": {
Expand All @@ -51,12 +51,10 @@
"reflect-metadata/Reflect",
"source-map-support/register"
],
"spec": [
"src/**/*.spec.ts"
],
"extensions": [
"ts"
]
],
"exit": true
},
"dependencies": {
"@types/react": "17.0.32",
Expand Down
8 changes: 3 additions & 5 deletions components/public-api/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"build": "mkdir -p lib; tsc",
"watch": "leeway exec --package .:lib --transitive-dependencies --filter-type yarn --components --parallel -- tsc -w --preserveWatchOutput",
"test": "mocha './**/*.spec.ts' --exclude './node_modules/**'",
"test": "mocha './**/*.spec.ts' --exclude './node_modules/**' --exit",
"test:brk": "yarn test --inspect-brk"
},
"mocha": {
Expand All @@ -19,12 +19,10 @@
"reflect-metadata/Reflect",
"source-map-support/register"
],
"spec": [
"src/**/*.spec.ts"
],
"extensions": [
"ts"
]
],
"exit": true
},
"dependencies": {
"@bufbuild/connect": "^0.13.0",
Expand Down
11 changes: 4 additions & 7 deletions components/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"purge": "yarn clean && yarn clean:node && yarn run rimraf yarn.lock",
"test:leeway": "yarn build && yarn test",
"test": "yarn test:unit && yarn test:db",
"test:unit": "mocha './**/*.spec.js' --exclude './node_modules/**'",
"test:db": "cleanup() { echo 'Cleanup started'; yarn stop-services; }; trap cleanup EXIT; . $(leeway run components/gitpod-db:db-test-env) && yarn start-services && mocha './**/*.spec.db.js' --exclude './node_modules/**'",
"test:unit": "mocha './**/*.spec.js' --exclude './node_modules/**' --exit",
"test:db": "cleanup() { echo 'Cleanup started'; yarn stop-services; }; trap cleanup EXIT; . $(leeway run components/gitpod-db:db-test-env) && yarn start-services && mocha './**/*.spec.db.js' --exclude './node_modules/**' --exit",
"start-services": "yarn start-testdb && yarn start-redis && yarn start-spicedb",
"stop-services": "yarn stop-redis && yarn stop-spicedb",
"start-testdb": "leeway run components/gitpod-db:init-testdb",
Expand All @@ -34,13 +34,10 @@
"reflect-metadata/Reflect",
"source-map-support/register"
],
"spec": [
"dist/**/*.spec.js",
"dist/**/*.spec.db.js"
],
"extensions": [
"js"
]
],
"exit": true
},
"files": [
"/dist",
Expand Down
8 changes: 3 additions & 5 deletions components/ws-manager-api/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"build": "mkdir -p lib && cp -f src/*.js src/*d.ts lib && tsc",
"watch": "leeway exec --package .:lib --transitive-dependencies --filter-type yarn --components --parallel -- tsc -w --preserveWatchOutput",
"test": "mocha './**/*.spec.ts' --exclude './node_modules/**'",
"test": "mocha './**/*.spec.ts' --exclude './node_modules/**' --exit",
"test:brk": "yarn test --inspect-brk"
},
"mocha": {
Expand All @@ -19,12 +19,10 @@
"reflect-metadata/Reflect",
"source-map-support/register"
],
"spec": [
"src/**/*.spec.ts"
],
"extensions": [
"ts"
]
],
"exit": true
},
"dependencies": {
"@gitpod/content-service": "0.1.5",
Expand Down
8 changes: 3 additions & 5 deletions components/ws-manager-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "UNLICENSED",
"scripts": {
"start": "node ./dist/index.js",
"test": "mocha './**/*.spec.ts' --exclude './node_modules/**'",
"test": "mocha './**/*.spec.ts' --exclude './node_modules/**' --exit",
"lint": "yarn eslint src/*.ts src/**/*.ts",
"lint:fix": "yarn eslint src/*.ts src/**/*.ts --fix",
"build": "yarn lint && npx tsc",
Expand All @@ -25,12 +25,10 @@
"reflect-metadata/Reflect",
"source-map-support/register"
],
"spec": [
"src/**/*.spec.ts"
],
"extensions": [
"ts"
]
],
"exit": true
},
"files": [
"/dist"
Expand Down

0 comments on commit f9cd0de

Please sign in to comment.