I have the following file that runs when I run node test.js
.
var Jasmine = require('jasmine');
var jasmine = new Jasmine();
var request = require('request');
describe("test", function(){
it("works", function(){
expect(5 + 2).toEqual(4);
});
it("should respond with hello world", function(done){
request('http://localhost:3000/', function(err, res, body){
expect(body).toEqual('hello world');
done();
})
});
})
jasmine.execute();
And this gives me the following output:
Started
F.
Failures:
1) test works
Message:
Expected 7 to equal 4.
Stack:
Error: Expected 7 to equal 4.
at Object.<anonymous>
2 specs, 1 failure
Finished in 0.037 seconds
Obviously one fails, showing the F, and one passes, showing the dot. Can I change this configuration to have it show both the passing and the failing tests?
Aucun commentaire:
Enregistrer un commentaire