Skip to content

Serve mock index.html and window.context

Administrator requested to merge mock-jscontext into master

Created by: felixfbecker

We currently need to record a HAR for every path, despite those serving the same index.html with only minor differences like the <title>. This could be annoying to record for pages requiring backend state, like the index.html for a campaigns details page. We also need the ability to stub window.context, in a type-safe way. This makes us always serve a mock index.html, which removes the need for recording HARs on the webapp. HARs will still be used for the browser extension though.

Also added NODE_NO_WARNINGS for now because Polly causes a lot of uncaughtException warnings and web-ext's transitive dependency of an old version of shelljs causes circular dependency warnings. I don't like silencing warnings, but they were extremely verbose (make the test output barely readable), and are outside of our control. We have an ESLint rule to catch uncaught exceptions.

Merge request reports

Loading