mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-24 07:59:12 -05:00
secure cookie error crash (#2685)
- fixes #1264 - fixes #1321 - fixes #1799 - fixes #2689 - fixes #2688 - fixes #2687 - fixes #2686
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
const cp = require('child_process')
|
||||
const path = require('path')
|
||||
const chalk = require('chalk')
|
||||
const finder = require('find-package-json')
|
||||
|
||||
const DEFAULT_SCRIPT = 'npm run test -- --inspect-brk=5566'
|
||||
|
||||
const file = process.argv[2]
|
||||
|
||||
// walks up from the file until it finds the first
|
||||
// package.json in a parent folder
|
||||
const { value: pkg, filename } = finder(file).next()
|
||||
|
||||
const script = pkg.scripts['test-debug'] || DEFAULT_SCRIPT
|
||||
|
||||
const [cmd, ...args] = script.split(' ')
|
||||
|
||||
const log = (k, v) => {
|
||||
// eslint-disable-next-line
|
||||
console.log(chalk.yellow(k), chalk.cyan(v))
|
||||
}
|
||||
|
||||
log('Node version:', process.version)
|
||||
log('Debug script:', script)
|
||||
log('Debugging test file:', file)
|
||||
|
||||
cp.spawn(cmd, args.concat(file), {
|
||||
cwd: path.dirname(filename),
|
||||
stdio: 'inherit',
|
||||
})
|
||||
Reference in New Issue
Block a user