Skip to content

Commit

Permalink
fix: print more debugging info (#297)
Browse files Browse the repository at this point in the history
* fix: print found few specs

* print first five specs

* print the empty custom spec pattern
  • Loading branch information
bahmutov authored Jun 4, 2024
1 parent bb5a27b commit 90d872e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ function cypressSplit(on, config) {
const specs = getSpecsToSplit(process.env, config)

console.log('%s there are %d found specs', label, specs.length)
if (specs.length < 5) {
specs.forEach((spec, k) => {
console.log('- %d: %s', k + 1, spec)
})
} else {
console.log('the first 5 specs')
specs.slice(0, 5).forEach((spec, k) => {
console.log('- %d: %s', k + 1, spec)
})
}
// console.log(specs)
const splitN = Number(SPLIT)
const splitIndex = Number(SPLIT_INDEX)
Expand Down Expand Up @@ -334,6 +344,7 @@ function cypressSplit(on, config) {
tempFilename,
)
config.specPattern = tempFilename
debug('set spec pattern to "%s"', config.specPattern)
}

return config
Expand Down

0 comments on commit 90d872e

Please sign in to comment.