mirror of
https://github.com/actions/toolkit
synced 2025-05-10 09:03:02 +00:00
summary: remove limit validation in client
This commit is contained in:
parent
ed87cc6ce3
commit
eef3e92175
2 changed files with 3 additions and 48 deletions
|
@ -1,11 +1,7 @@
|
|||
import * as fs from 'fs'
|
||||
import * as os from 'os'
|
||||
import path from 'path'
|
||||
import {
|
||||
markdownSummary,
|
||||
SUMMARY_ENV_VAR,
|
||||
SUMMARY_LIMIT_BYTES
|
||||
} from '../src/markdown-summary'
|
||||
import {markdownSummary, SUMMARY_ENV_VAR} from '../src/markdown-summary'
|
||||
|
||||
const testFilePath = path.join(__dirname, 'test', 'test-summary.md')
|
||||
|
||||
|
@ -96,13 +92,6 @@ describe('@actions/core/src/markdown-summary', () => {
|
|||
await expect(write).rejects.toThrow()
|
||||
})
|
||||
|
||||
it('throws if write will exceed file limit', async () => {
|
||||
const aaa = 'a'.repeat(SUMMARY_LIMIT_BYTES + 1)
|
||||
const write = markdownSummary.addRaw(aaa).write()
|
||||
|
||||
await expect(write).rejects.toThrow()
|
||||
})
|
||||
|
||||
it('appends text to summary file', async () => {
|
||||
await fs.promises.writeFile(testFilePath, '# ', {encoding: 'utf8'})
|
||||
await markdownSummary.addRaw(fixtures.text).write()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue