Skip to content

Commit

Permalink
Set tests concurrency using the TEST_THREADS environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmz committed May 5, 2024
1 parent 4232a1e commit 6eb5c74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@
"version": "2.20.0",
"private": true,
"scripts": {
"start": "cross-env TZ=UTC yarn babel index.js",
"start": "TZ=UTC yarn babel index.js",
"travis": "run-s -c typecheck test lint",
"test": "run-s typecheck reset-test-db test-rollback mocha-p",
"test": "run-s typecheck reset-test-db test-rollback test-all",
"coverage": "run-s reset-test-db nyc",
"lint": "run-s eslint ejslint",
"ejslint": "ejslint app",
"eslint": "eslint . --ext \".js,.jsx,.ts\"",
"babel": "node -r './esm/register.cjs'",
"typecheck": "tsc",
"reset-test-db": "run-s \"babel bin/reset_test_db.js --schemas=4\"",
"reset-test-db": "run-s \"babel bin/reset_test_db.js --schemas ${TEST_THREADS:-1}\"",
"test-rollback": "knex --env test migrate:rollback && knex --env test migrate:latest",
"test-just": "cross-env NODE_ENV=test FRFS_SECRET=test-secret mocha",
"mocha": "cross-env TZ=UTC run-s \"test-just -b test/unit test/integration test/functional test/cleanup.js\"",
"mocha-p": "cross-env TZ=UTC run-s \"test-just -b -p -j 4 test/unit test/integration test/functional test/cleanup.js\"",
"test-just": "NODE_ENV=test FRFS_SECRET=test-secret mocha -p -j ${TEST_THREADS:-1}",
"test-all": "TZ=UTC run-s \"test-just -b test/unit test/integration test/functional test/cleanup.js\"",
"console": "yarn babel bin/console",
"nyc": "nyc yarn mocha",
"nyc": "nyc yarn test-all",
"data_transfer": "yarn babel bin/data_transfer",
"reindex_hashtags": "yarn babel bin/reindex_hashtags",
"notification_emails": "yarn babel bin/notification_emails",
Expand Down Expand Up @@ -146,7 +145,6 @@
"@typescript-eslint/parser": "~6.19.1",
"chai": "5.1.0",
"chai-fs": "~2.0.0",
"cross-env": "~7.0.3",
"ejs-lint": "~2.0.0",
"esbuild": "~0.20.2",
"eslint": "~8.56.0",
Expand Down
15 changes: 1 addition & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4238,18 +4238,6 @@ __metadata:
languageName: node
linkType: hard

"cross-env@npm:~7.0.3":
version: 7.0.3
resolution: "cross-env@npm:7.0.3"
dependencies:
cross-spawn: "npm:^7.0.1"
bin:
cross-env: src/bin/cross-env.js
cross-env-shell: src/bin/cross-env-shell.js
checksum: f3765c25746c69fcca369655c442c6c886e54ccf3ab8c16847d5ad0e91e2f337d36eedc6599c1227904bf2a228d721e690324446876115bc8e7b32a866735ecf
languageName: node
linkType: hard

"cross-spawn@npm:^4.0.0":
version: 4.0.2
resolution: "cross-spawn@npm:4.0.2"
Expand Down Expand Up @@ -4284,7 +4272,7 @@ __metadata:
languageName: node
linkType: hard

"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3":
"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3":
version: 7.0.3
resolution: "cross-spawn@npm:7.0.3"
dependencies:
Expand Down Expand Up @@ -6213,7 +6201,6 @@ __metadata:
commander: "npm:~11.1.0"
config: "npm:~3.3.11"
console-stamp: "npm:~3.1.2"
cross-env: "npm:~7.0.3"
debug: "npm:~4.3.4"
ejs: "npm:~3.1.10"
ejs-lint: "npm:~2.0.0"
Expand Down

0 comments on commit 6eb5c74

Please sign in to comment.