I am using Webpack to build a webapp that is designed for the browser.
After my build process I have two files: index.html
and app.bundle.js
To my dismay I have found that the although the development
Webpack configuration works the production
configuration does not because of errors during minification.
I am looking for the most basic way to run a test that does the following:
- Opens the
index.html
file (which contains<script defer="defer" src="app.bundle.js">
and sees if there are any errors when the script contained inapp.bundle.js
runs
That is it.
I need a full Browser environment (requestianimationframe
, fetch
, etc.)
I have tried JSDOM
and I get Error: Uncaught [ReferenceError: fetch is not defined]
which looks like it has a bunch of issues, and then there are a tremendous amount of overlapping libraries and tools like Phantom.js Zombie.js Pupeteer, headless-chrome etc. and I honestly can’t figure out how to just open my app. I have tried to explore all of these tools but they are all complicated.
Ideally I wouldn’t have to create a local webserver, but I’d be fine with that if this is what is required.