mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2026-04-22 22:08:51 +00:00
Add number_force input and tests for PR #1652
Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com>
This commit is contained in:
parent
ff69574fa9
commit
19a13e0618
4 changed files with 116 additions and 1 deletions
|
|
@ -78,6 +78,7 @@ afterEach(() => {
|
|||
delete process.env["INPUT_IGNORE_EMPTY"]
|
||||
delete process.env["INPUT_SKIP_UNCHANGED"]
|
||||
delete process.env["INPUT_FOLLOW_SYMBOLIC_LINKS"]
|
||||
delete process.env["INPUT_NUMBER_FORCE"]
|
||||
})
|
||||
|
||||
test("repo", async () => {
|
||||
|
|
@ -428,3 +429,26 @@ test("skip_unchanged", async () => {
|
|||
})
|
||||
expect(await config.getBody()).toEqual("")
|
||||
})
|
||||
|
||||
test("number_force", async () => {
|
||||
process.env["INPUT_NUMBER_FORCE"] = "456"
|
||||
mockConfig.pullRequestNumber = 456
|
||||
|
||||
const config = await import('../src/config')
|
||||
expect(config).toMatchObject({
|
||||
pullRequestNumber: 456,
|
||||
repo: {owner: "marocchino", repo: "stick-pull-request-comment"},
|
||||
header: "",
|
||||
append: false,
|
||||
recreate: false,
|
||||
deleteOldComment: false,
|
||||
hideOldComment: false,
|
||||
hideAndRecreate: false,
|
||||
hideClassify: "OUTDATED",
|
||||
hideDetails: false,
|
||||
githubToken: "some-token",
|
||||
ignoreEmpty: false,
|
||||
skipUnchanged: false
|
||||
})
|
||||
expect(await config.getBody()).toEqual("")
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue