mirror of
https://github.com/actions/toolkit
synced 2025-05-10 09:03:02 +00:00
summary: method to clear file and buffer
This commit is contained in:
parent
d27bf857e6
commit
339dd63bec
2 changed files with 17 additions and 1 deletions
|
@ -151,6 +151,13 @@ describe('@actions/core/src/markdown-summary', () => {
|
|||
expect(markdownSummary.isEmptyBuffer()).toBe(true)
|
||||
})
|
||||
|
||||
it('clears a buffer and summary file', async () => {
|
||||
await fs.promises.writeFile(testFilePath, 'content', {encoding: 'utf8'})
|
||||
await markdownSummary.clear()
|
||||
await assertSummary('')
|
||||
expect(markdownSummary.isEmptyBuffer()).toBe(true)
|
||||
})
|
||||
|
||||
it('adds EOL', async () => {
|
||||
await markdownSummary
|
||||
.addRaw(fixtures.text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue