Skip to content

Commit 8ed464d

Browse files
committed
style: apply formatting to archives test
1 parent 526773b commit 8ed464d

1 file changed

Lines changed: 17 additions & 21 deletions

File tree

test/unit/archives.test.mts

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -530,27 +530,23 @@ describe('archives', () => {
530530
})
531531

532532
describe('zip bomb protection', () => {
533-
it(
534-
'should block files exceeding maxFileSize in zip',
535-
async () => {
536-
await runWithTempDir(async tempDir => {
537-
const bombZipPath = path.join(tempDir, 'bomb.zip')
538-
const zip = new AdmZip()
539-
540-
// Create a large buffer (150MB > 100MB default)
541-
const largeBuffer = Buffer.alloc(150 * 1024 * 1024)
542-
zip.addFile('large-file.bin', largeBuffer)
543-
544-
zip.writeZip(bombZipPath)
545-
546-
const extractDir = path.join(tempDir, 'extract')
547-
await expect(extractZip(bombZipPath, extractDir)).rejects.toThrow(
548-
/File size exceeds limit/,
549-
)
550-
}, 'security-zip-bomb-file-')
551-
},
552-
15_000,
553-
)
533+
it('should block files exceeding maxFileSize in zip', async () => {
534+
await runWithTempDir(async tempDir => {
535+
const bombZipPath = path.join(tempDir, 'bomb.zip')
536+
const zip = new AdmZip()
537+
538+
// Create a large buffer (150MB > 100MB default)
539+
const largeBuffer = Buffer.alloc(150 * 1024 * 1024)
540+
zip.addFile('large-file.bin', largeBuffer)
541+
542+
zip.writeZip(bombZipPath)
543+
544+
const extractDir = path.join(tempDir, 'extract')
545+
await expect(extractZip(bombZipPath, extractDir)).rejects.toThrow(
546+
/File size exceeds limit/,
547+
)
548+
}, 'security-zip-bomb-file-')
549+
}, 15_000)
554550

555551
it('should block total size exceeding maxTotalSize in zip', async () => {
556552
await runWithTempDir(async tempDir => {

0 commit comments

Comments
 (0)