Skip to content

Commit

Permalink
Move message to end of arguments and make optional
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehopkinson authored Feb 4, 2017
1 parent 5a3735e commit 9767c12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assert-equals.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
function assertEquals (message, expected, actual) {
function assertEquals (expected, actual, message) {
try {
deepEquals(expected, actual);
}
catch (failure) {
throw (`${message} ${failure.message}`);
throw (`${message ? message + ' ' : ''}${failure.message}`);
}
};

Expand Down

0 comments on commit 9767c12

Please sign in to comment.