- Casa already has a working document for writing tests, please check it out if you haven't yet: Unit test cases guideline
- Since the how-to's of writing tests are covered there, this one will focus on the things/errors you might run into, and what to do with them. We'll use examples from Samarpan codebase
- We have
screen.debug()
,screen.logTestingPlaygroundURL()
- Notice that sometimes the logs get cut off/are truncated — use
DEBUG_PRINT_LIMIT=10000 npm run unit /path here/
to display the whole log - You can keep
console.log
in the components themselves — they will log when tests run