test-hmr

0.1.2 • Public • Published

test-hmr

Testbed for Webpack HMR.

Spins Puppeteer + Web Dev Server with a virtual in-memory file system.

Test utils let you pilot the virtual FS, and wait until HMR update has been applied (by detecting the console message: "[HMR] App is up to date.").

Usage

Create a bootstrap file pointing to the app under test:

// test/bootstrap.js
const { bootstrap } = require('test-hmr')

bootstrap()

Require test-hmr to run your tests:

npx mocha --require test-hmr test

Package Sidebar

Install

npm i test-hmr

Weekly Downloads

8

Version

0.1.2

License

ISC

Unpacked Size

302 kB

Total Files

92

Last publish

Collaborators

  • rixo