mirror of
https://github.com/actions/toolkit
synced 2025-05-10 17:12:54 +00:00
summary: add link/anchor element
This commit is contained in:
parent
ab2b23c50d
commit
302a5b31d8
2 changed files with 26 additions and 0 deletions
|
@ -60,6 +60,10 @@ const fixtures = {
|
|||
quote: {
|
||||
text: 'Where the world builds software',
|
||||
cite: 'https://github.com/about'
|
||||
},
|
||||
link: {
|
||||
text: 'GitHub',
|
||||
href: 'https://github.com/'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -237,4 +241,12 @@ describe('@actions/core/src/markdown-summary', () => {
|
|||
const expected = `<blockquote cite="https://github.com/about">Where the world builds software</blockquote>${os.EOL}`
|
||||
await assertSummary(expected)
|
||||
})
|
||||
|
||||
it('adds a link with href', async () => {
|
||||
await markdownSummary
|
||||
.addLink(fixtures.link.text, fixtures.link.href)
|
||||
.write()
|
||||
const expected = `<a href="https://github.com/">GitHub</a>${os.EOL}`
|
||||
await assertSummary(expected)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue