You can write console.error as described in this blog post
describe('TestSuite', function() { var oldError = console.error; beforeEach(function() { console.error = function(message) { throw new Error(message); }; }); return afterEach(function() { return console.error = oldError; }); it('should fail', function() { console.error("Oops!") });
Carlos Barcelona
source share