Open SergeyVolynkin opened 1 year ago
@bahmutov If I change the source code of node_modules/cypress-split/src/index.js
to use '/Users/…/…/…/…/…/cypress/e2e'
instead of os.tmpdir()
:
// node_modules/cypress-split/src/index.js
const tempFilename = path.join(
- os.tmpdir(),
`empty-${splitIndex + 1}-of-${splitN}.cy.js`,
)
const tempFilename = path.join(
+ '/Users/…/…/…/…/…/cypress/e2e', // i.e. placing the `empty-4-of-4.cy.js` where other cypress specs are located
`empty-${splitIndex + 1}-of-${splitN}.cy.js`,
)
it solves the problem 🤔
Ughh, to solve this, I would need a small repo with a reproducible example
Absolutely! Will prepare a quick repo @bahmutov today (thank you for a quick response!)
Hi @bahmutov, extracted minimal reproducible example https://github.com/SergeyVolynkin/cypress-split-issue-105-ts-types#root-cause-analysis. Added root cause analysis into README.md
Please let me know what can be the fix in your code, I can open PR into https://github.com/bahmutov/cypress-split accordingly
Will be on stand-by 🙂, @bahmutov
I would not be on stand by because I have a lot of other stuff to do. If you can please open a pull request with a fix instead.
No worries, thank you @bahmutov! It's a very niche corner case where there are more runners than test files. Can be solved by manually creating empty(or TODO) spec files.
Hi @bahmutov, thank you very much for this project!
Could you please suggest how to make
cypress-split
work when usingpaths
aliases intsconfig
?i.e. given the
/cypress/tsconfig.json
:setting up running the
cypress-split
per readme, when having only 3 spec files: (running on local Mac OS machine)and running the following succeds:
Additional info:
node_modules/cypress-split/src/index.js
to useempty-spec.cy.ts
and runSPLIT=4 SPLIT_INDEX=3 yarn cypress run
again, I get more info on the error:Oops...we found an error preparing this test file:
The error was:
Error: Webpack Compilation Error [tsl] ERROR TS18002: The 'files' list in config file 'tsconfig.json' is empty.