Skip to content

Commit

Permalink
Allow unsupported shell error in compatibility tests (#1351)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericcornelissen authored Dec 20, 2023
1 parent 6d1469f commit 88af241
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions test/compat/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export function testShescapeEscape() {
try {
shescape = new Shescape(options);
} catch (error) {
const known = ["No executable could be found for "];
const known = [
"No executable could be found for ",
"Shescape does not support the shell ",
];

if (!known.some((knownError) => error.message.includes(knownError))) {
throw new Error(`Unexpected error:\n${error}`);
Expand Down Expand Up @@ -56,7 +59,10 @@ export function testShescapeEscapeAll() {
try {
shescape = new Shescape(options);
} catch (error) {
const known = ["No executable could be found for "];
const known = [
"No executable could be found for ",
"Shescape does not support the shell ",
];

if (!known.some((knownError) => error.message.includes(knownError))) {
throw new Error(`Unexpected error:\n${error}`);
Expand Down Expand Up @@ -91,7 +97,10 @@ export function testShescapeQuote() {
try {
shescape = new Shescape(options);
} catch (error) {
const known = ["No executable could be found for "];
const known = [
"No executable could be found for ",
"Shescape does not support the shell ",
];

if (!known.some((knownError) => error.message.includes(knownError))) {
throw new Error(`Unexpected error:\n${error}`);
Expand Down Expand Up @@ -127,7 +136,10 @@ export function testShescapeQuoteAll() {
try {
shescape = new Shescape(options);
} catch (error) {
const known = ["No executable could be found for "];
const known = [
"No executable could be found for ",
"Shescape does not support the shell ",
];

if (!known.some((knownError) => error.message.includes(knownError))) {
throw new Error(`Unexpected error:\n${error}`);
Expand Down

0 comments on commit 88af241

Please sign in to comment.