用CoffeeScript编写测试的Jest代码覆盖率
有没有办法在用CoffeeScript编写的单元测试上运行Jest覆盖工具?保险范围报告总是告诉我100%的保险范围用CoffeeScript编写测试的Jest代码覆盖率,coffeescript,code-coverage,jestjs,Coffeescript,Code Coverage,Jestjs,有没有办法在用CoffeeScript编写的单元测试上运行Jest覆盖工具?保险范围报告总是告诉我100%的保险范围 jest --coverage ----------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ----------|----------|------
jest --coverage
----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
----------|----------|----------|----------|----------|----------------|
All files | 100 | 100 | 100 | 100 | |
----------|----------|----------|----------|----------|----------------|
我已经用下面的Jest预处理器将CoffeeScript转换成JavaScript
var coffee = require('coffee-script');
module.exports = {
// CoffeeScript files can be .coffee or .litcoffee
process: function(src, path) {
if (coffee.helpers.isCoffee(path)) {
return coffee.compile(src, {
bare: true,
literate: coffee.helpers.isLiterate(path)
});
}
return src;
}
};
你已经找到解决办法了吗?同样的问题。