mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-03-31 21:43:21 +08:00
summary: method to clear file and buffer
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user