metarhia / metatests

Extremely simple to use test framework and runner for Metarhia technology stack 🧪
https://metarhia.com
Other
18 stars 4 forks source link

Use 'domain's to catch unhandledExeptions in tests #85

Closed lundibundi closed 6 years ago

lundibundi commented 6 years ago

Wrap every test-function call in a domain to allow to properly catch and report such errors without failing the whole testing process.

lundibundi commented 6 years ago

ping @belochub.

lundibundi commented 6 years ago

Landed in 327c027aa23cd5acdbd655dbcba3abc79416c190.

primeare commented 6 years ago

@lundibundi But domains are deprecated in Node.js, aren't they? It is unsafe to use them.

lundibundi commented 6 years ago

Not really, they have been deprecated for a few years already. They will remain 'doc-deprecation' until there is an alternative API present in core. I'll just switch to it then. Though that won't probably happen any time soon.