0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Renamed tests to .test.js & updated commands

refs: https://github.com/TryGhost/Team/issues/856
refs: https://github.com/TryGhost/Team/issues/756

- The .test.js extension is better than _spec.js as it's more obvious that it's an extension
- It also meaans we can use the --extension parameter in mocha, which should result in a better default behaviour for `yarn test`
- It also highlights that some of our tests were named incorrectly and were not (and still will not be) run (see https://github.com/TryGhost/Team/issues/856)
- Note: even with this change, `yarn test` is throwing errors, I believe because of this issue https://github.com/TryGhost/Team/issues/756
This commit is contained in:
Hannah Wolfe 2021-07-06 20:09:57 +01:00
parent 1dda2cd931
commit f08a55c21f
No known key found for this signature in database
GPG key ID: 9F8C7532D0A6BA55
376 changed files with 5 additions and 5 deletions

View file

@ -26,12 +26,12 @@
"setup": "yarn install && knex-migrator init && grunt symlink && grunt init || (exit 0)",
"main": "grunt shell:main && grunt subgrunt:init",
"build": "grunt build",
"test": "mocha --require=test/utils/overrides.js --exit --trace-warnings --recursive --timeout=60000",
"test": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js --timeout=60000",
"test:all": "yarn test:unit && yarn test:acceptance && yarn test:regression",
"test:debug": "DEBUG=ghost:test* yarn test",
"test:unit": "mocha --require=test/utils/overrides.js --exit --trace-warnings './test/unit/**/*_spec.js' --timeout=7000",
"test:acceptance": "mocha --require=test/utils/overrides.js --exit --trace-warnings './test/api-acceptance/**/*_spec.js' './test/frontend-acceptance/**/*_spec.js' --timeout=10000",
"test:regression": "mocha --require=test/utils/overrides.js --exit --trace-warnings './test/regression/**/*_spec.js' --timeout=60000",
"test:unit": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/unit' --timeout=7000",
"test:acceptance": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/api-acceptance' './test/frontend-acceptance' --timeout=10000",
"test:regression": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/regression' --timeout=60000",
"test:slow": "yarn test:unit --reporter=mocha-slow-test-reporter && yarn test:acceptance --reporter=mocha-slow-test-reporter",
"lint:server": "eslint --ignore-path .eslintignore 'core/server/**/*.js' 'core/*.js' '*.js'",
"lint:shared": "eslint --ignore-path .eslintignore 'core/shared/**/*.js'",
@ -73,7 +73,7 @@
"@tryghost/logging": "0.1.3",
"@tryghost/magic-link": "1.0.5",
"@tryghost/members-api": "1.19.0",
"@tryghost/members-csv": "1.1.1",
"@tryghost/members-csv": "1.1.0",
"@tryghost/members-ssr": "1.0.5",
"@tryghost/mw-session-from-token": "0.1.22",
"@tryghost/package-json": "1.0.2",

Some files were not shown because too many files have changed in this diff Show more