目前我有一个包含此信息的package.json:
DELETE FROM...
我在ES6中有代码,而且我的测试是在ES6中编写的,我使用包含此信息的运行程序文件jasmine-runner.js运行测试:
"scripts": {
"test": "babel-node test/jasmine-runner.js",
"coveralls": "istanbul cover babel-node test/jasmine-runner.js && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
}
在我运行
之后var Jasmine = require('jasmine');
var SpecReporter = require('jasmine-spec-reporter');
var noop = function() {};
var jrunner = new Jasmine();
jrunner.configureDefaultReporter({print: noop}); // remove default reporter logs
jasmine.getEnv().addReporter(new SpecReporter()); // add jasmine-spec-reporter
jrunner.loadConfigFile('test/support/jasmine.json');
jrunner.execute();
我有这个日志:
npm run coveralls