mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2026-04-14 18:16:52 +00:00
📦️ build
This commit is contained in:
parent
db8c408d3e
commit
efaaab3fd4
3 changed files with 41 additions and 11 deletions
|
|
@ -254,12 +254,27 @@ describe("getBodyOf", () => {
|
|||
|
||||
describe("commentsEqual", () => {
|
||||
test.each([
|
||||
{ body: "body", previous: "body\n<!-- Sticky Pull Request Commentheader -->", header: "header", expected: true },
|
||||
{ body: "body", previous: "body\n<!-- Sticky Pull Request Comment -->", header: "", expected: true },
|
||||
{ body: "body", previous: "body\n<!-- Sticky Pull Request Commenta different header -->", header: "header", expected: false },
|
||||
{ body: "body", previous: "body", header: "header", expected: false },
|
||||
{ body: "body", previous: "", header: "header", expected: false },
|
||||
{ body: "", previous: "body", header: "header", expected: false },
|
||||
{
|
||||
body: "body",
|
||||
previous: "body\n<!-- Sticky Pull Request Commentheader -->",
|
||||
header: "header",
|
||||
expected: true
|
||||
},
|
||||
{
|
||||
body: "body",
|
||||
previous: "body\n<!-- Sticky Pull Request Comment -->",
|
||||
header: "",
|
||||
expected: true
|
||||
},
|
||||
{
|
||||
body: "body",
|
||||
previous: "body\n<!-- Sticky Pull Request Commenta different header -->",
|
||||
header: "header",
|
||||
expected: false
|
||||
},
|
||||
{body: "body", previous: "body", header: "header", expected: false},
|
||||
{body: "body", previous: "", header: "header", expected: false},
|
||||
{body: "", previous: "body", header: "header", expected: false}
|
||||
])("commentsEqual(%s, %s, %s)", ({body, previous, header, expected}) => {
|
||||
expect(commentsEqual(body, previous, header)).toEqual(expected)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue