mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-05 14:30:32 -05:00
0366d4fa89
* feat: use supportFile by testingType * Fix defaults * Start renaming files, and updating system-tests * Fix some tests * Fix some tests * Fix more tests * Try to fix CI * Fix more tests * Fix some tests * Revert changes * Revert supportFile defaultValue * Fix some tests * Fix some tests * Fix some tests * Fix some tests * Update supportFile example * Update snapshots * Remove scaffold support * Handle config errors * Remove scaffold * Fix tests * Fix test * Update test * Fix test * Update supportFile template * Fix template
52 lines
1.3 KiB
JavaScript
52 lines
1.3 KiB
JavaScript
/* eslint-disable no-console */
|
|
const Promise = require('bluebird')
|
|
|
|
module.exports = {
|
|
'fixturesFolder': false,
|
|
'e2e': {
|
|
'supportFile': false,
|
|
setupNodeEvents (on, config) {
|
|
on('before:run', (runDetails) => {
|
|
const { specs, browser } = runDetails
|
|
|
|
console.log('before:run:', specs[0].relative, browser.name)
|
|
|
|
return Promise.delay(10).then(() => {
|
|
return console.log('before:run is awaited')
|
|
})
|
|
})
|
|
|
|
on('after:run', (results) => {
|
|
const { totalTests, totalPassed, totalFailed } = results
|
|
|
|
console.log('after:run:', { totalTests, totalPassed, totalFailed })
|
|
|
|
return Promise.delay(10).then(() => {
|
|
return console.log('after:run is awaited')
|
|
})
|
|
})
|
|
|
|
on('before:spec', (spec) => {
|
|
console.log('before:spec:', spec.relative)
|
|
|
|
return Promise.delay(10).then(() => {
|
|
return console.log('before:spec is awaited')
|
|
})
|
|
})
|
|
|
|
on('after:spec', (spec, results) => {
|
|
const { stats } = results
|
|
const { tests, passes, failures } = stats
|
|
|
|
console.log('spec:end:', spec.relative, { tests, passes, failures })
|
|
|
|
return Promise.delay(10).then(() => {
|
|
return console.log('after:spec is awaited')
|
|
})
|
|
})
|
|
|
|
return config
|
|
},
|
|
},
|
|
}
|