1.0.1 • Published 5 years ago
ava-dom v1.0.1
ava-dom
Installation
npm install --save-dev ava-domConfigure ava to require ava-dom/shim before every test file.
{
"ava": {
"require": [
"ava-dom/shim"
]
}
}Alternatively, just import and call shim function in ava test.
import ava from 'ava';
import {
shim,
} from 'ava-dom';
shim();Usage
ava-dom adds all jest-dom methods to ava assertions prototype, i.e. all jest-dom methods are accessible under ava's t variable.
import ava from 'ava';
test();Compatibility with jest-dom
All jest-dom methods are available in ava-dom
toBeCheckedtoBeDisabledtoBeEmptytoBeEmptyDOMElementtoBeEnabledtoBeInTheDocumenttoBeInTheDOMtoBeInvalidtoBePartiallyCheckedtoBeRequiredtoBeValidtoBeVisibletoContainElementtoContainHTMLtoHaveAttributetoHaveClasstoHaveDescriptiontoHaveDisplayValuetoHaveFocustoHaveFormValuestoHaveStyletoHaveTextContenttoHaveValue