Skip to content

Commit

Permalink
Fix lint violations for no-throw-literal
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Oct 8, 2018
1 parent 6b6746c commit 91fb220
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/sandbox-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ describe("Sandbox", function () {
it("has no side effects on the prototype", function () {
var proto = {
method: function () {
throw "error";
throw new Error("error");
}
};
var Class = function () { return; };
Expand Down
3 changes: 2 additions & 1 deletion test/spy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,7 @@ describe("spy", function () {
});

this.spyWithStringError = createSpy.create(function () {
// eslint-disable-next-line no-throw-literal
throw "error";
});
});
Expand Down Expand Up @@ -1916,7 +1917,7 @@ describe("spy", function () {

it("is tracked even if exceptions are thrown", function () {
var spy = createSpy(function () {
throw "an exception";
throw new Error("an exception");
});

assert.exception(spy);
Expand Down
2 changes: 1 addition & 1 deletion test/stub-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2734,7 +2734,7 @@ describe("stub", function () {
it("has no side effects on the prototype", function () {
var proto = {
method: function () {
throw "error";
throw new Error("error");
}
};
var Class = function () { return; };
Expand Down

0 comments on commit 91fb220

Please sign in to comment.