-
I have code with a catch block that diagnoses any exception thrown and does not rethrow it by design -- it's a repl program and I don't want errors in one execution to wedge the runtime. this doesn't play well with chai asserts. the fails are caught, printed, and then ignored. so in one way, the application is working correctly ;). should I add a check to each such catch block that just rethrows assert errors from chai? is there a chai API for testing if an exception is a chai assert failure? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can check that it is an |
Beta Was this translation helpful? Give feedback.
You can check that it is an
instanceof AssertionError
, which is a library export. All chai errors areAssertionError
instances.