mirror of
https://github.com/kiegroup/git-backporting.git
synced 2025-07-18 04:28:24 +02:00
feat: update the default comment on error
This commit is contained in:
parent
7c420531c8
commit
8b0412b111
10 changed files with 75 additions and 29 deletions
|
@ -1,11 +1,19 @@
|
|||
import { injectError } from "@bp/service/runner/runner-util";
|
||||
import { injectError, injectTargetBranch } from "@bp/service/runner/runner-util";
|
||||
|
||||
describe("check runner utilities", () => {
|
||||
test("properly inject error message", () => {
|
||||
expect(injectError("Original message: {{error}}", "to inject")).toStrictEqual("Original message: to inject");
|
||||
});
|
||||
|
||||
test("missing placeholder in the original message", () => {
|
||||
test("missing error placeholder in the original message", () => {
|
||||
expect(injectError("Original message: {{wrong}}", "to inject")).toStrictEqual("Original message: {{wrong}}");
|
||||
});
|
||||
|
||||
test("properly inject target branch into message", () => {
|
||||
expect(injectTargetBranch("Original message: {{target-branch}}", "to inject")).toStrictEqual("Original message: to inject");
|
||||
});
|
||||
|
||||
test("missing target branch placeholder in the original message", () => {
|
||||
expect(injectTargetBranch("Original message: {{wrong}}", "to inject")).toStrictEqual("Original message: {{wrong}}");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue