Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Avoid use of
esm
when running tests on legacy Node.js versions
Because `esm` does not support legacy versions of Node.js, at least not below Node.js 6 as of writing this, we have to avoid using that whenever tests are running on legacy versions. But now that the source code (`mustache.js`) is written in ESM syntax, how on earth are we going to run tests on these legacy versions of Node.js? We gotta run the build step first, so that we end up with a `mustache.js` file in CJS, or strictly speaking it will be UMD. That's kinda pain in the backside isn't it? Yes, but running tests on legacy versions are not meant to be done locally, but rather in CI. That means we can easily automate the flow of (1) building the source code before (2) starting the test suite. For our futureselves, if we want to stop running tests on legacy versions of Node.js; the changes introduces in this commit, could be removed completely.
- Loading branch information