Skip to content

Commit

Permalink
revert test script
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Apr 7, 2022
1 parent c71c19a commit 21b6595
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/cypress-run-with-conditional-record-flag.js
Expand Up @@ -13,18 +13,18 @@ const IS_CI = !!(
const shouldRecord =
!!process.env.CYPRESS_PROJECT_ID && !!process.env.CYPRESS_RECORD_KEY && IS_CI

const cypressBin = path.join(process.cwd(), `node_modules/cypress/bin/cypress`)
const cypressBin = path.join(process.cwd(), `node_modules/.bin/cypress`)

// first arg is node binary itself
// second arg is .js file entry point (as in - path to this file)
// we only care about extra args
const cypressArgs = [cypressBin, `run`, ...process.argv.slice(2)]
const cypressArgs = [`run`, ...process.argv.slice(2)]

if (shouldRecord) {
cypressArgs.push(`--record`)
}

childProcess.execFileSync(process.execPath, cypressArgs, {
childProcess.execFileSync(cypressBin, cypressArgs, {
cwd: process.cwd(),
stdio: `inherit`,
})

0 comments on commit 21b6595

Please sign in to comment.