Created by: wdhorton
I put this together to show how we can add a test runner to the project. Discussion of exactly which test runner to use is ongoing, so I don't want to focus too much on that part. The Mocha-specific part of this is relatively minor, and could be swapped for a different framework relatively easily.
The main part is setting up a test config for Webpack and creating an entry point to bundle all the tests. Note that the first argument to require.context has to be a constant string (see issue here), which is why I made three different entry point files to handle where the file is in relation to the app's src
directory. Definitely open to a more straightforward solution if anyone has suggestions.
The test plan: right now I'm planning to add on to the existing e2e.sh test, since the other scripts use that.
I think getting testing that "just works" is an important part of this project, and I'm excited to see where we can go with this!