Skip to content

Commit

Permalink
Revert quote error changes for Stubscape
Browse files Browse the repository at this point in the history
  • Loading branch information
ericcornelissen committed Oct 23, 2023
1 parent 3471de0 commit 8fc9049
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/compat/testing.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ testProp(
try {
stubscape.quote(arg);
} catch (error) {
const knownErrors = ["Can't quote when shell is false"];
const knownErrors = [""];

if (!knownErrors.includes(error.message)) {
t.fail(`Unexpected error:\n${error}`);
Expand All @@ -96,7 +96,7 @@ testProp(
try {
stubscape.quoteAll(args);
} catch (error) {
const knownErrors = ["Can't quote when shell is false"];
const knownErrors = [""];

if (!knownErrors.includes(error.message)) {
t.fail(`Unexpected error:\n${error}`);
Expand Down
2 changes: 1 addition & 1 deletion testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class Shescape {

quote(arg) {
if (this.shell === false) {
throw new Error("Can't quote when shell is false");
throw new Error();
}

return this.escape(arg);
Expand Down

0 comments on commit 8fc9049

Please sign in to comment.