Skip to content

Instantly share code, notes, and snippets.

View caye-telus's full-sized avatar
🟢
Active 3pm-12am PHT

Caye Borreo caye-telus

🟢
Active 3pm-12am PHT
  • Manila
  • 19:17 (UTC +08:00)
View GitHub Profile
@caye-telus
caye-telus / Troubleshooting while writing tests.md
Last active June 30, 2022 12:27
Troubleshooting while writing tests

Some notes

  1. Casa already has a working document for writing tests, please check it out if you haven't yet: Unit test cases guideline
  2. 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

Troubleshooting writing tests

1. Debugging basics

  • 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