问题
I am using jasmine-node framework for my API automation. I am able to run REST services and able to get the result using node-fetch or http. Without reporter when I run with the below command I was able to get the results in console
jasmine spec/xxx.spec.js
After that I added a reporter(pretty html reporter) for reporting. Now when I run those commands, I get the below error.
No specs found
Below are my code for reporter.js
var Jasmine = require('jasmine');
var HtmlReporter = require('jasmine-pretty-html-reporter').Reporter;
var path=require('path');
var jasmine = new Jasmine();
jasmine.loadConfigFile('./spec/support/jasmine.json');
// options object
jasmine.addReporter(new HtmlReporter({
path: path.join('./spec/helpers','results')
}));
jasmine.execute();
and jasmine.json is below
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": true
}
Please help me with this. Also please let me know if there is any better reporter than this.Thanks in advance
来源:https://stackoverflow.com/questions/51834238/no-spec-found-is-displayed-after-i-use-one-jasmine-reporter