Is there a way to run the Jest module testing tool, which is written in CoffeeScript? The coverage report always tells me about 100% coverage.
jest --coverage
----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
----------|----------|----------|----------|----------|----------------|
All files | 100 | 100 | 100 | 100 | |
----------|----------|----------|----------|----------|----------------|
I am already rewriting CoffeeScript in JavaScript with the following Jest preprocessor
var coffee = require('coffee-script');
module.exports = {
process: function(src, path) {
if (coffee.helpers.isCoffee(path)) {
return coffee.compile(src, {
bare: true,
literate: coffee.helpers.isLiterate(path)
});
}
return src;
}
};
source
share