Type Definitions
testCodeCallback(objects)
This is the code for a test case. It may return a external:Promise
if there is async behavior that must
be waited-on to properly assert behavior.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
objects |
Object | objects passed into your test that you may need. Properties
|
Examples
test("some test", ({document,assert}) => {
const element = document.querySelector("div")
assert(div.getAttribute("data-foo") != null)
})
test("some other test", ({document,window,assert}) => {
const element = document.querySelector("div")
assert.equal(window.history.state["foo"], "bar")
})