Skip to content

Commit

Permalink
add missing test scripts to packages that have partially have them
Browse files Browse the repository at this point in the history
'test', 'test-unit', 'test-watch', and 'test-debug'

This makes running them from the root easier and enables debugging via IDE on more packages
  • Loading branch information
andrew-codes committed Oct 31, 2019
1 parent f9cf04e commit fab87e8
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 13 deletions.
5 changes: 4 additions & 1 deletion packages/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"clean-deps": "rm -rf node_modules",
"postinstall": "echo '@packages/electron needs: yarn build'",
"start": "./bin/cypress-electron",
"test": "mocha --compilers coffee:@packages/coffee/register"
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "mocha --compilers coffee:@packages/coffee/register",
"test-watch": "yarn test-unit --watch"
},
"dependencies": {
"@cypress/icons": "0.7.0",
Expand Down
5 changes: 4 additions & 1 deletion packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
"scripts": {
"postinstall": "echo '@packages/example needs: yarn build'",
"clean-deps": "rm -rf node_modules",
"test": "cross-env NODE_ENV=test mocha",
"test": "yarn test-unit",
"test-e2e": "cypress run",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "cross-env NODE_ENV=test mocha",
"test-watch": "yarn test-unit --watch",
"build": "node ./bin/build.js && gulp build",
"build-prod": "yarn build",
"predeploy": "yarn build",
Expand Down
6 changes: 4 additions & 2 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
"clean": "gulp clean",
"clean-deps": "rm -rf node_modules",
"postinstall": "echo '@packages/extension needs: yarn build'",
"test": "cross-env NODE_ENV=test mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
"test-watch": "yarn test --watch",
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "cross-env NODE_ENV=test mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
"test-watch": "yarn test-unit --watch",
"watch": "gulp watch"
},
"dependencies": {
Expand Down
5 changes: 3 additions & 2 deletions packages/https-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"clean-deps": "rm -rf node_modules",
"https": "node https.js",
"start": "node index.js",
"test": "cross-env NODE_ENV=test mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
"test-debug": "cross-env NODE_ENV=test mocha --inspect-brk --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "cross-env NODE_ENV=test mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
"test-watch": "cross-env NODE_ENV=test mocha --watch"
},
"dependencies": {
Expand Down
5 changes: 4 additions & 1 deletion packages/network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"scripts": {
"build-js": "tsc --project .",
"clean-deps": "rm -rf node_modules",
"test": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json"
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
"test-watch": "yarn test-unit --watch"
},
"dependencies": {
"bluebird": "3.5.3",
Expand Down
6 changes: 4 additions & 2 deletions packages/reporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
"cypress:run": "node ../../scripts/cypress run --project .",
"postinstall": "echo '@packages/reporter needs: yarn build'",
"lint": "eslint --fix lib/*.js src/*.js* src/**/*.js*",
"test": "mocha 'src/**/*.spec.*'",
"test-watch": "yarn test --watch",
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "mocha 'src/**/*.spec.*'",
"test-watch": "yarn test-unit --watch",
"watch": "yarn build --watch --progress"
},
"devDependencies": {
Expand Down
6 changes: 4 additions & 2 deletions packages/runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
"build-prod": "cross-env NODE_ENV=production yarn build",
"clean-deps": "rm -rf node_modules",
"postinstall": "echo '@packages/runner needs: yarn build'",
"test": "mocha src/**/*.spec.*",
"test-watch": "yarn test --watch",
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "mocha src/**/*.spec.*",
"test-watch": "yarn test-unit --watch",
"watch": "webpack --watch --progress"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/socket/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"clean-deps": "rm -rf node_modules",
"postinstall": "patch-package",
"test": "cross-env NODE_ENV=test mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
"test-unit": "cross-env NODE_ENV=test mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
"test-watch": "cross-env NODE_ENV=test mocha --watch"
},
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"main": "index.js",
"scripts": {
"clean-deps": "rm -rf node_modules",
"test": "node test"
"test": "yarn test-unit",
"test-unit": "node test",
"test-watch": "echo 'no watching of tests'"
},
"dependencies": {
"debug": "4.1.1"
Expand Down

0 comments on commit fab87e8

Please sign in to comment.