mint-metrics / mojito-js-delivery

🧪 Source-controlled JS split testing framework for building and launching A/B tests.
https://mojito.mx/docs/js-delivery-intro
Other
16 stars 29 forks source link

Should we have a suite of unit tests on the build script? #47

Closed kingo55 closed 8 months ago

kingo55 commented 4 years ago

The build script rarely fails (only scenario in recent memory has been ES6 which has always been a bug - since we never build tests in ES6). Would it be useful to add some unit tests around some basic functionality like?:

  1. Standard container build works
  2. YAML test build works
  3. Broken YAML / JS test objects are handled
  4. ES6 and other quirks don't break the container

I think it could help prevent regressions and make it easier to support new changes to the build script in future.

allmywant commented 4 years ago

@kingo55 Good point. We can dynamically create a few test files into the lib/waves folder and run the unit test on them, finally delete these files.