lundi 21 septembre 2015

Can I change the output of jasmine-node to show the passing tests in the console as well as the failing?

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