Struct wasm_bindgen_test::__rt::Context [−][src]
pub struct Context { /* fields omitted */ }
Expand description
Runtime test harness support instantiated in JS.
The node.js entry script instantiates a Context
here which is used to
drive test execution.
Implementations
Creates a new context ready to run tests.
A Context
is the main structure through which test execution is
coordinated, and this will collect output and results for all executed
tests.
Inform this context about runtime arguments passed to the test harness.
Eventually this will be used to support flags, but for now it’s just used to support test filters.
Executes a list of tests, returning a promise representing their eventual completion.
This is the main entry point for executing tests. All the tests passed
in are the JS Function
object that was plucked off the
WebAssembly.Instance
exports list.
The promise returned resolves to either true
if all tests passed or
false
if at least one test failed.
Entry point for a synchronous test in wasm. The #[wasm_bindgen_test]
macro generates invocations of this method.
Trait Implementations
The type that holds the reference to Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read more
Recover a Self::Anchor
from Self::Abi
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Context
impl !UnwindSafe for Context
Blanket Implementations
Mutably borrows from an owned value. Read more
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
Same as IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more