mirror of
https://github.com/cypress-io/cypress.git
synced 2026-03-01 12:29:24 -06:00
chore: replace mocha.opts with .mocharc.js for packages that are mocha version 6+ (#31518)
* chore: replace mocha.opts with .mocharc.js for packages that are mocha version 6+ * move the mocharc file into the package root * fix mocha reporter config location * fix route to reporter-config * store artifacts for unit tests * move cli mocharc file to root of package * remove storing artifacts * remove js extension from errors mocharc
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,6 +20,7 @@ Cached Theme Material Design.pak
|
||||
packages/data-context/src/**/*.js
|
||||
packages/errors/src/**/*.js
|
||||
packages/errors/test/**/*.js
|
||||
!packages/errors/test/.mocharc.js
|
||||
|
||||
# from driver
|
||||
packages/driver/cypress/videos
|
||||
|
||||
6
cli/.mocharc.js
Normal file
6
cli/.mocharc.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
spec: 'test/**/*_spec.js',
|
||||
timeout: 10000,
|
||||
reporter: 'spec',
|
||||
recursive: true
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
test/**/*_spec.js
|
||||
--timeout 10000
|
||||
--reporter spec
|
||||
--recursive
|
||||
11
packages/errors/.mocharc.js
Normal file
11
packages/errors/.mocharc.js
Normal file
@@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
spec: 'test/unit/*.ts',
|
||||
require: '@packages/ts/register',
|
||||
recursive: true,
|
||||
extension: ['ts'],
|
||||
reporter: 'mocha-multi-reporters',
|
||||
reporterOptions: {
|
||||
configFile: '../../mocha-reporter-config.json'
|
||||
},
|
||||
exit: true
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
test/unit
|
||||
-r @packages/ts/register
|
||||
--recursive
|
||||
--extension=js,ts
|
||||
--reporter mocha-multi-reporters
|
||||
--reporter-options configFile=../../mocha-reporter-config.json
|
||||
--exit
|
||||
9
packages/network/.mocharc.js
Normal file
9
packages/network/.mocharc.js
Normal file
@@ -0,0 +1,9 @@
|
||||
module.exports = {
|
||||
spec: [
|
||||
'test/unit/**/*.ts',
|
||||
'test/integration/**/*.ts'
|
||||
],
|
||||
require: '../web-config/node-register',
|
||||
timeout: 10000,
|
||||
recursive: true
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
test/unit/**/*.ts
|
||||
test/integration/**/*.ts
|
||||
--require ../web-config/node-register
|
||||
--timeout 10000
|
||||
--recursive
|
||||
@@ -27,6 +27,7 @@
|
||||
"@cypress/request-promise": "^5.0.0",
|
||||
"@types/parse5-html-rewriting-stream": "5.1.1",
|
||||
"fs-extra": "9.1.0",
|
||||
"mocha": "3.5.3",
|
||||
"nock": "13.2.9",
|
||||
"sinon": "9.0.2",
|
||||
"sinon-chai": "3.5.0",
|
||||
|
||||
Reference in New Issue
Block a user