Skip to content

Commit

Permalink
restore stub dont callThrough
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaub committed Apr 13, 2019
1 parent fec1027 commit 21995b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/reporters/base.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,17 +407,19 @@ describe('Base reporter', function() {

describe('when reporter output immune to user test changes', function() {
var sandbox;
var baseConsoleLog;

beforeEach(function() {
sandbox = sinon.createSandbox();
sandbox.stub(console, 'log');
sandbox.stub(Base, 'consoleLog').callThrough();
baseConsoleLog = sandbox.stub(Base, 'consoleLog');
});

it('should let you stub out console.log without effecting reporters output', function() {
Base.list([]);
baseConsoleLog.restore();

expect(Base.consoleLog, 'was called');
expect(baseConsoleLog, 'was called');
expect(console.log, 'was not called');
});

Expand Down

0 comments on commit 21995b3

Please sign in to comment.