1.0.1 • Published 2 years ago

abdomen v1.0.1

Weekly downloads
10
License
MIT
Repository
github
Last release
2 years ago

abdomen

a tiny utility to setup JSDOM for tests

install

yarn add --dev abdomen

use

abdomen supports both modules and commonjs

modules

import 'abdomen/setup'

commonjs

require('abdomen/setup')

or

node -r abdomen/setup

api

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
1.0.1

2 years ago

1.0.0

3 years ago

0.9.1

3 years ago

0.9.0

3 years ago