Fix failing test

This commit is contained in:
Edoardo Pirovano 2021-07-27 18:45:40 +01:00
parent 99afdfbfbd
commit 186161e61c
No known key found for this signature in database
GPG key ID: 047556B5D93FFE28
3 changed files with 11 additions and 11 deletions

View file

@ -42,7 +42,7 @@ ava_1.default("regex matchers are applied to stdout for non-zero exit code", asy
]; ];
await t.throwsAsync(exec.exec("node", testArgs), { await t.throwsAsync(exec.exec("node", testArgs), {
instanceOf: Error, instanceOf: Error,
message: "The process 'node' failed with exit code 1", message: /failed with exit code 1/,
}); });
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher("node", testArgs, matchers), { await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher("node", testArgs, matchers), {
instanceOf: Error, instanceOf: Error,
@ -56,7 +56,7 @@ ava_1.default("regex matchers are applied to stderr for non-zero exit code", asy
]; ];
await t.throwsAsync(exec.exec("node", testArgs), { await t.throwsAsync(exec.exec("node", testArgs), {
instanceOf: Error, instanceOf: Error,
message: "The process 'node' failed with exit code 1", message: /failed with exit code 1/,
}); });
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher("node", testArgs, matchers), { await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher("node", testArgs, matchers), {
instanceOf: Error, instanceOf: Error,
@ -72,7 +72,7 @@ ava_1.default("matcher returns correct error message when multiple matchers defi
]; ];
await t.throwsAsync(exec.exec("node", testArgs), { await t.throwsAsync(exec.exec("node", testArgs), {
instanceOf: Error, instanceOf: Error,
message: "The process 'node' failed with exit code 1", message: /failed with exit code 1/,
}); });
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher("node", testArgs, matchers), { await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher("node", testArgs, matchers), {
instanceOf: Error, instanceOf: Error,
@ -88,7 +88,7 @@ ava_1.default("matcher returns first match to regex when multiple matches", asyn
]; ];
await t.throwsAsync(exec.exec("node", testArgs), { await t.throwsAsync(exec.exec("node", testArgs), {
instanceOf: Error, instanceOf: Error,
message: "The process 'node' failed with exit code 1", message: /failed with exit code 1/,
}); });
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher("node", testArgs, matchers), { await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher("node", testArgs, matchers), {
instanceOf: Error, instanceOf: Error,
@ -106,7 +106,7 @@ ava_1.default("exit code matchers are applied", async (t) => {
]; ];
await t.throwsAsync(exec.exec("node", testArgs), { await t.throwsAsync(exec.exec("node", testArgs), {
instanceOf: Error, instanceOf: Error,
message: "The process 'node' failed with exit code 123", message: /failed with exit code 123/,
}); });
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher("node", testArgs, matchers), { await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher("node", testArgs, matchers), {
instanceOf: Error, instanceOf: Error,

File diff suppressed because one or more lines are too long

View file

@ -33,7 +33,7 @@ test("regex matchers are applied to stdout for non-zero exit code", async (t) =>
await t.throwsAsync(exec.exec("node", testArgs), { await t.throwsAsync(exec.exec("node", testArgs), {
instanceOf: Error, instanceOf: Error,
message: "The process 'node' failed with exit code 1", message: /failed with exit code 1/,
}); });
await t.throwsAsync(toolrunnerErrorCatcher("node", testArgs, matchers), { await t.throwsAsync(toolrunnerErrorCatcher("node", testArgs, matchers), {
@ -56,7 +56,7 @@ test("regex matchers are applied to stderr for non-zero exit code", async (t) =>
await t.throwsAsync(exec.exec("node", testArgs), { await t.throwsAsync(exec.exec("node", testArgs), {
instanceOf: Error, instanceOf: Error,
message: "The process 'node' failed with exit code 1", message: /failed with exit code 1/,
}); });
await t.throwsAsync(toolrunnerErrorCatcher("node", testArgs, matchers), { await t.throwsAsync(toolrunnerErrorCatcher("node", testArgs, matchers), {
@ -81,7 +81,7 @@ test("matcher returns correct error message when multiple matchers defined", asy
await t.throwsAsync(exec.exec("node", testArgs), { await t.throwsAsync(exec.exec("node", testArgs), {
instanceOf: Error, instanceOf: Error,
message: "The process 'node' failed with exit code 1", message: /failed with exit code 1/,
}); });
await t.throwsAsync(toolrunnerErrorCatcher("node", testArgs, matchers), { await t.throwsAsync(toolrunnerErrorCatcher("node", testArgs, matchers), {
@ -106,7 +106,7 @@ test("matcher returns first match to regex when multiple matches", async (t) =>
await t.throwsAsync(exec.exec("node", testArgs), { await t.throwsAsync(exec.exec("node", testArgs), {
instanceOf: Error, instanceOf: Error,
message: "The process 'node' failed with exit code 1", message: /failed with exit code 1/,
}); });
await t.throwsAsync(toolrunnerErrorCatcher("node", testArgs, matchers), { await t.throwsAsync(toolrunnerErrorCatcher("node", testArgs, matchers), {
@ -133,7 +133,7 @@ test("exit code matchers are applied", async (t) => {
await t.throwsAsync(exec.exec("node", testArgs), { await t.throwsAsync(exec.exec("node", testArgs), {
instanceOf: Error, instanceOf: Error,
message: "The process 'node' failed with exit code 123", message: /failed with exit code 123/,
}); });
await t.throwsAsync(toolrunnerErrorCatcher("node", testArgs, matchers), { await t.throwsAsync(toolrunnerErrorCatcher("node", testArgs, matchers), {