Closed pygy closed 1 year ago
This introduces an opt-in way to have local assertions and spies, that are aware of potential timeouts in async context.
o("some test", o=> { o(true).equals(true) })
To be able to use this, you need to wrap the code in
o.localAssertions(()=>{ /*specs and tests come here*/ })
... or have o.localAssertions() called before any spec is registered if you want it globally (using the --preload CLI options).
o.localAssertions()
--preload
This will become the default API in v6, and the old one will be reachable through o.globalAssertions().
o.globalAssertions()
This fixes #50 and #54.
This introduces an opt-in way to have local assertions and spies, that are aware of potential timeouts in async context.
To be able to use this, you need to wrap the code in
... or have
o.localAssertions()
called before any spec is registered if you want it globally (using the--preload
CLI options).This will become the default API in v6, and the old one will be reachable through
o.globalAssertions()
.This fixes #50 and #54.