MithrilJS / ospec

Noiseless testing framework
MIT License
48 stars 13 forks source link

Complex assetions like `deepEquals` and `satisfies` plugins should differentiate between bail outs and internal errors #48

Open pygy opened 2 years ago

pygy commented 2 years ago

Currently, if a crash happens in the deepEquals code (as in #41), or in a .satisfies plugin, this is reported as a bailout.

Crashes in user code (e.g. an getter that throws when doing a deepEquals, or some other failure in user code called from the satisfies() validator) should cause bailouts, but errors in ospec and validators should throw errors and exit ASAP with a corresponding stack trace.