Documentation
¶
Rendered for js/wasm
Overview ¶
Package testutil provides utility functions for testing WebAssembly modules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitForGlobalFunc ¶
func WaitForGlobalFunc(t *testing.T, funcName string, opts ...WaitForGlobalFuncOption)
WaitForGlobalFunc waits for a global JavaScript function to be defined, or times out after the specified duration. It can also run custom assertions.
Types ¶
type WaitForGlobalFuncOption ¶
type WaitForGlobalFuncOption func(*waitForGlobalFuncConfig)
WaitForGlobalFuncOption is a configuration option for the WaitForGlobalFunc function.
func WithAssertion ¶
func WithAssertion(assertion func(js.Value) assert.ValueAssertionFunc) WaitForGlobalFuncOption
WithAssertion adds a custom assertion to the WaitForGlobalFunc function.
func WithTimeout ¶
func WithTimeout(timeout time.Duration) WaitForGlobalFuncOption
WithTimeout sets the timeout for the WaitForGlobalFunc function.
Click to show internal directories.
Click to hide internal directories.