1.0.1 • Published 4 years ago

ava-dom v1.0.1

Weekly downloads
2
License
BSD-3-Clause
Repository
github
Last release
4 years ago

ava-dom

Travis build status Coveralls NPM version Canonical Code Style Twitter Follow

Port of jest-dom to ava.

Installation

npm install --save-dev ava-dom

Configure 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