1.0.1 • Published 4 years ago
abdomen v1.0.1
abdomen
a tiny utility to setup JSDOM for tests
install
yarn add --dev abdomenuse
abdomen supports both modules and commonjs
modules
import 'abdomen/setup'commonjs
require('abdomen/setup')or
node -r abdomen/setupapi
import { setup, teardown } from 'abdomen'
const context = setup()
// context has two properties available
// context.jsdom is a reference to the JSDOM instance
// context.teardown is the same teardown function as imported