Files
cypress/scripts/cypress.js
Zach Bloomquist c80e482009 Fix test script, add Mocha result checks to internal Cypress te… (#7110)
* fix cypress.js script typo

* add verify-mocha-results to driver integration test stages

* add cypress-multi-reporters

* fix circle.yml

* fix yarn.lock

* cleanup

* use working_directory instead of yarn workspace commands

* add reports to ui-components and reporter, update circle.yml

* fix circle.yml

* fix circle.yml

* fix circle.yml

* add more verify-mocha-results
2020-04-23 13:00:46 -04:00

32 lines
763 B
JavaScript

const path = require('path')
const execa = require('execa')
const debug = require('debug')('cypress:scripts')
const args = process.argv.slice(2)
const pathToCli = path.resolve(__dirname, '..', 'cli', 'bin', 'cypress')
// always run the CLI in dev mode
// so it utilizes the development binary
// instead of the globally installed prebuilt one
args.push('--dev')
debug('starting the CLI in dev mode with args %o', {
command: pathToCli,
args,
})
const exit = ({ exitCode }) => {
if (typeof exitCode !== 'number') {
// eslint-disable-next-line no-console
console.error(`missing exit code from execa (received ${exitCode})`)
process.exit(1)
}
process.exit(exitCode)
}
execa(pathToCli, args, { stdio: 'inherit' })
.then(exit)
.catch(exit)