Skip to content

Commit

Permalink
fix: restore set-port.js to work in Cypress 10+ environment (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcC399 committed Apr 4, 2023
1 parent 828f942 commit e3cf550
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/set-port.js
Expand Up @@ -8,7 +8,7 @@ const { readFileSync, writeFileSync } = require('fs')
// in all our example specs and then run the tests

// if doing it locally, you can change back to the original port
// with "git checkout cypress/integration/examples" command
// with "git restore ." command

if (!process.env.PORT) {
console.log('PORT environment variable is not set, nothing to do')
Expand All @@ -30,7 +30,7 @@ console.log('replacing "%s" with "%s" in all spec files', input, newUrl)
const getSpecFilenames = () => {
const globby = require('globby')

return globby(['cypress/integration/**/*.spec.js'])
return globby(['cypress/e2e/**/*.cy.js'])
}

const replacePort = (filename) => {
Expand All @@ -48,4 +48,3 @@ getSpecFilenames()
console.error(e.message)
process.exit(1)
})

0 comments on commit e3cf550

Please sign in to comment.