Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Commit

Permalink
Full coverage!
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomek Wiszniewski committed May 19, 2016
1 parent 6d2381a commit 7edfaba
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,25 @@ test('Doesn’t break `console.log`', (is) => {
mockConsole.log(logMessage, extraLogData);
});

test('Doesn’t affect how `console.log` handles non-strings', (is) => {
is.plan(1);

const logValue = {};
const log = (outputValue) => {
is.equal(outputValue, logValue,
'passes the reference directly'
);
};

const mockConsole = { log };
proxyquire('.', { global: { console: mockConsole } });

mockConsole.log(logValue);
});

test('Strips off data for machines', (is) => {
const log = (message) => {
/* istanbul ignore next */
is.fail(`ignores a “${message}” log line`);
};

Expand Down

0 comments on commit 7edfaba

Please sign in to comment.