Luna, however, does make some assumptions about the developer’s environment and does have certain requirements, with tests and code having to be written as ECMAScript 6 (2015) modules. And because Luna does not transpile source code with the exception of JSX, developers cannot use it with TypeScript or CoffeeScript. Also, tests will not run in older browsers.
Luna’s test process
The tool takes several steps in the test process:
- Searches are done for functions whose names begin with
test, which are exported from files and directories specified by a user.
- The rollup API is used to create a bundle for tests in memory.
- Test functions are called.
- Results are communicated back to the main process via console logs.
- Browser testing is built in and runs by default.
- Code coverage reports are generated automatically.
Where to download Luna
You can download Luna from GitHub. Luna can be added to a project via NPM:
npm install luna-testing.