Skip to content

Commit

Permalink
Fix violations for no-useless-concat after running Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Oct 10, 2018
1 parent 9be0d4e commit 06b4c16
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion lib/sinon/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ assert = {
// If this fails, we'll just fall back to the blank string
}

failAssertion(this, "expected " + expected + " to be " + "called in order but were called as " + actual);
failAssertion(this, "expected " + expected + " to be called in order but were called as " + actual);
} else {
assert.pass("callOrder");
}
Expand Down
32 changes: 16 additions & 16 deletions test/assert-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ describe("assert", function() {
it("assert.called exception message", function() {
assert.equals(
this.message("called", this.obj.doSomething),
"expected doSomething to have been called at " + "least once but was never called"
"expected doSomething to have been called at least once but was never called"
);
});

Expand All @@ -1223,7 +1223,7 @@ describe("assert", function() {

assert.equals(
this.message("notCalled", this.obj.doSomething).replace(/ at.*/g, ""),
"expected doSomething to not have been called " + "but was called once\n doSomething()"
"expected doSomething to not have been called but was called once\n doSomething()"
);
});

Expand Down Expand Up @@ -1275,7 +1275,7 @@ describe("assert", function() {

assert.equals(
message,
"expected doSomething, doop, foo to be called in " + "order but were called as doop, doSomething, foo"
"expected doSomething, doop, foo to be called in order but were called as doop, doSomething, foo"
);
});

Expand All @@ -1295,7 +1295,7 @@ describe("assert", function() {

var message = this.message("callOrder", obj.doop, obj.foo);

assert.equals(message, "expected doop, foo to be called in " + "order but were called as foo");
assert.equals(message, "expected doop, foo to be called in order but were called as foo");
});

it("assert.callOrder with missing last call exception message", function() {
Expand All @@ -1314,15 +1314,15 @@ describe("assert", function() {

var message = this.message("callOrder", obj.doop, obj.foo);

assert.equals(message, "expected doop, foo to be called in " + "order but were called as doop");
assert.equals(message, "expected doop, foo to be called in order but were called as doop");
});

it("assert.callCount exception message", function() {
this.obj.doSomething();

assert.equals(
this.message("callCount", this.obj.doSomething, 3).replace(/ at.*/g, ""),
"expected doSomething to be called thrice but was called " + "once\n doSomething()"
"expected doSomething to be called thrice but was called once\n doSomething()"
);
});

Expand All @@ -1332,7 +1332,7 @@ describe("assert", function() {

assert.equals(
this.message("calledOnce", this.obj.doSomething).replace(/ at.*/g, ""),
"expected doSomething to be called once but was called " + "twice\n doSomething()\n doSomething()"
"expected doSomething to be called once but was called twice\n doSomething()\n doSomething()"
);

this.obj.doSomething();
Expand All @@ -1349,7 +1349,7 @@ describe("assert", function() {

assert.equals(
this.message("calledTwice", this.obj.doSomething).replace(/ at.*/g, ""),
"expected doSomething to be called twice but was called " + "once\n doSomething()"
"expected doSomething to be called twice but was called once\n doSomething()"
);
});

Expand Down Expand Up @@ -1734,7 +1734,7 @@ describe("assert", function() {

assert.equals(
this.message("calledWithExactly", this.obj.doSomething, 1, 3).replace(/ at.*/g, ""),
"expected doSomething to be called with exact arguments \n" + "1\n" + "3\n" + color.red("hey")
"expected doSomething to be called with exact arguments \n1\n3\n" + color.red("hey")
);
});

Expand All @@ -1761,7 +1761,7 @@ describe("assert", function() {

assert.equals(
this.message("neverCalledWith", this.obj.doSomething, 1, 2).replace(/ at.*/g, ""),
"expected doSomething to never be called with " + "arguments 1, 2\n doSomething(1, 2, 3)"
"expected doSomething to never be called with arguments 1, 2\n doSomething(1, 2, 3)"
);
});

Expand All @@ -1770,7 +1770,7 @@ describe("assert", function() {

assert.equals(
this.message("neverCalledWithMatch", this.obj.doSomething, 1, 2).replace(/ at.*/g, ""),
"expected doSomething to never be called with match " + "1, 2\n doSomething(1, 2, 3)"
"expected doSomething to never be called with match 1, 2\n doSomething(1, 2, 3)"
);
});

Expand All @@ -1780,7 +1780,7 @@ describe("assert", function() {

assert.equals(
this.message("threw", this.obj.doSomething).replace(/ at.*/g, ""),
"doSomething did not throw exception\n" + " doSomething(1, 3, hey)\n doSomething(1, 3)"
"doSomething did not throw exception\n doSomething(1, 3, hey)\n doSomething(1, 3)"
);
});

Expand All @@ -1790,14 +1790,14 @@ describe("assert", function() {

assert.equals(
this.message("alwaysThrew", this.obj.doSomething).replace(/ at.*/g, ""),
"doSomething did not always throw exception\n" + " doSomething(1, 3, hey)\n doSomething(1, 3)"
"doSomething did not always throw exception\n doSomething(1, 3, hey)\n doSomething(1, 3)"
);
});

it("assert.match exception message", function() {
assert.equals(
this.message("match", { foo: 1 }, [1, 3]),
"expected value to match\n" + " expected = [1, 3]\n" + " actual = { foo: 1 }"
"expected value to match\n expected = [1, 3]\n actual = { foo: 1 }"
);
});
});
Expand Down Expand Up @@ -1828,7 +1828,7 @@ describe("assert", function() {

assert.equals(
createExceptionMessage("called", obj[symbol]),
"expected Symbol(Something Symbolic) to have been " + "called at least once but was never called"
"expected Symbol(Something Symbolic) to have been called at least once but was never called"
);
});

Expand All @@ -1841,7 +1841,7 @@ describe("assert", function() {

assert.equals(
createExceptionMessage("called", obj[symbol]),
"expected Symbol() to have been " + "called at least once but was never called"
"expected Symbol() to have been called at least once but was never called"
);
}
);
Expand Down
8 changes: 4 additions & 4 deletions test/call-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ describe("sinonSpy.call", function() {
call.yield();
},
{
message: "somethingAwesome cannot yield since no callback was passed. " + "Received [23, 42]"
message: "somethingAwesome cannot yield since no callback was passed. Received [23, 42]"
}
);
});
Expand Down Expand Up @@ -719,7 +719,7 @@ describe("sinonSpy.call", function() {
call.yieldOn(thisObj);
},
{
message: "somethingAwesome cannot yield since no callback was passed. " + "Received [23, 42]"
message: "somethingAwesome cannot yield since no callback was passed. Received [23, 42]"
}
);
});
Expand Down Expand Up @@ -1605,7 +1605,7 @@ describe("sinonSpy.call", function() {

assert.equals(
spy.printf("%C").replace(/ at.*/g, ""),
"\n spy(" + str + ")" + "\n\n spy(" + str + ")" + "\n\n spy(" + str + ")"
"\n spy(" + str + ")\n\n spy(" + str + ")\n\n spy(" + str + ")"
);

spy.resetHistory();
Expand All @@ -1616,7 +1616,7 @@ describe("sinonSpy.call", function() {

assert.equals(
spy.printf("%C").replace(/ at.*/g, ""),
"\n spy(test)" + "\n spy(" + str + ")" + "\n\n spy(" + str + ")"
"\n spy(test)\n spy(" + str + ")\n\n spy(" + str + ")"
);
});
});
Expand Down
6 changes: 3 additions & 3 deletions test/mock-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ describe("sinonMock", function() {
object.method();
},
{
message: "Unexpected call: method()\n" + " Expected method(42) thrice (never called)"
message: "Unexpected call: method()\n Expected method(42) thrice (never called)"
}
);
});
Expand Down Expand Up @@ -967,7 +967,7 @@ describe("sinonMock", function() {
mock.verify();
},
{
message: "Expected method(42) thrice (never called)\n" + "Expectation met: method(1[, ...]) once"
message: "Expected method(42) thrice (never called)\nExpectation met: method(1[, ...]) once"
}
);
});
Expand Down Expand Up @@ -999,7 +999,7 @@ describe("sinonMock", function() {
object.method();
},
{
message: "Unexpected call: method()\n" + " Expectation met: method([...]) at most twice"
message: "Unexpected call: method()\n Expectation met: method([...]) at most twice"
}
);
});
Expand Down
12 changes: 6 additions & 6 deletions test/stub-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,7 @@ describe("stub", function() {
stub(23, 42);
},
{
message: "somethingAwesome expected to yield, but no callback " + "was passed. Received [23, 42]"
message: "somethingAwesome expected to yield, but no callback was passed. Received [23, 42]"
}
);
});
Expand Down Expand Up @@ -1606,7 +1606,7 @@ describe("stub", function() {
stub(23, 42);
},
{
message: "somethingAwesome expected to yield, but no callback " + "was passed. Received [23, 42]"
message: "somethingAwesome expected to yield, but no callback was passed. Received [23, 42]"
}
);
});
Expand Down Expand Up @@ -1749,7 +1749,7 @@ describe("stub", function() {
stub(23, 42);
},
{
message: "somethingAwesome expected to yield, but no callback " + "was passed. Received [23, 42]"
message: "somethingAwesome expected to yield, but no callback was passed. Received [23, 42]"
}
);
});
Expand Down Expand Up @@ -1859,7 +1859,7 @@ describe("stub", function() {
var stub = createStub().yieldsTo("success");

assert.exception(stub, {
message: "stub expected to yield to 'success', but no object " + "with such a property was passed."
message: "stub expected to yield to 'success', but no object with such a property was passed."
});
});

Expand All @@ -1870,7 +1870,7 @@ describe("stub", function() {
var stub = createStub().yieldsTo(symbol);

assert.exception(stub, {
message: "stub expected to yield to 'Symbol()', but no object with " + "such a property was passed."
message: "stub expected to yield to 'Symbol()', but no object with such a property was passed."
});
}
});
Expand Down Expand Up @@ -2030,7 +2030,7 @@ describe("stub", function() {
this.stub.yieldsToOn("success", this.fakeContext);

assert.exception(this.stub, {
message: "stub expected to yield to 'success', but no object " + "with such a property was passed."
message: "stub expected to yield to 'success', but no object with such a property was passed."
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/util/core/iterable-to-string-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("util/core/iterable-to-string", function() {
map.set(true, true);
map.set(undefined, undefined);
map.set(null, null);
var expected = "[1,1]," + "['one','one']," + "[true,true]," + "[undefined,undefined]," + "[null,null]";
var expected = "[1,1],['one','one'],[true,true],[undefined,undefined],[null,null]";

assert.equals(iterableToString(map), expected);
});
Expand Down

0 comments on commit 06b4c16

Please sign in to comment.