Skip to content

Commit

Permalink
Cleanup newline and variable initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfakerjohn committed Dec 20, 2016
1 parent f67ab71 commit 4af2809
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/sinon/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ function mirrorPropAsAssertion(name, method, message) {
var failed = false;

verifyIsValidAssertion(name, args);

if (typeof method === "function") {
failed = !method(fake);
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/sinon/spy.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,10 @@ spyApi.formatters = {
for (var j = 0; j < calledArgs.length || j < args.length; ++j) {
message += "\n";
var calledArgMessage = j < calledArgs.length ? sinonFormat(calledArgs[j]) : "";
var expectedArgMessage = j < args.length ? sinonFormat(args[j]) : "";
if (sinonMatch.isMatcher(args[j])) {
message += colorSinonMatchText(args[j], calledArgs[j], calledArgMessage);
} else {
var expectedArgMessage = j < args.length ? sinonFormat(args[j]) : "";
var diff = jsDiff.diffJson(calledArgMessage, expectedArgMessage);
message += colorDiffText(diff);
}
Expand Down

0 comments on commit 4af2809

Please sign in to comment.