vigour-io / test

Test runner for universal modules
ISC License
0 stars 0 forks source link

Find a way to properly handle exceptions #8

Open shawninder opened 8 years ago

shawninder commented 8 years ago

Errors thrown by the script itself can be easily handled, but those thrown within the context on Nightmare are a little bit harder. These come in 2 categories:

  1. Errors thrown by the script being injected
  2. Errors thrown by the page itself

This can probably be achieved by wrapping the injected code in a try block (which is already done but needs to be tested) and with the on action. Also see available events