Skip to content

Commit

Permalink
Lint errors. Closes #168
Browse files Browse the repository at this point in the history
  • Loading branch information
hueniverse committed Oct 31, 2015
1 parent 4626f41 commit 5758161
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/index.js
Expand Up @@ -723,10 +723,11 @@ exports.assert = function (condition /*, msg1, msg2, msg3 */) {
}
}

msgs = msgs.map(function (msg) {
msgs = msgs.map((msg) => {

return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : exports.stringify(msg);
});

throw new Error(msgs.join(' ') || 'Unknown error');
};

Expand Down
3 changes: 2 additions & 1 deletion test/index.js
Expand Up @@ -1853,7 +1853,8 @@ describe('assert()', () => {

try {
fn();
} catch (err) {
}
catch (err) {
expect(error).to.equal(error); // should be the same reference
expect(error).to.not.equal(error2); // error with the same message should not match
}
Expand Down

0 comments on commit 5758161

Please sign in to comment.