jeudi 29 décembre 2016

Webpack development testing workflow

Using webpack, is a more streamlined development testing workflow possible?

I've been using webpack for a little while now, but I've never used any front end testing frameworks, so would like to start integrating them into my development. From what I understand from the tutorials I've seen so far, there needs to be two separate processes:

  1. Development/production build process which bundles source files and either injects them to the browser through a middleware or generates the production files
  2. Test process which can monitor a set of files for changes and run tests

Each of these appear to run in their own process (eg localhost:3000/localhost:8080), which means manually firing them both separately - the former which is required for the developer to work and the latter (the testing process) which the developer should do to run the tests.

Is there a way to integrate the testing process into the development workflow more? What I'd like is for tests to be run in the same process that the dev HMR build process runs in. It will run the tests that have been affected by the code that has been changed only and output any failing items to the browser (in the same way ESLint does).

Is this possible?

Aucun commentaire:

Enregistrer un commentaire