feat: add SQS + EventBridge
This commit is contained in:
@@ -2,7 +2,7 @@ import {describe, expect, test} from 'bun:test'
|
||||
import {execFile} from 'node:child_process'
|
||||
import {rm, writeFile} from 'node:fs/promises'
|
||||
import {tmpdir} from 'node:os'
|
||||
import {createZipArchive, crc32, handlerFileName} from './zipArchive'
|
||||
import {createZipArchive, crc32, handlerFileName, readStoredZipEntry} from './zipArchive'
|
||||
|
||||
describe('crc32', () => {
|
||||
// Reference values from the standard CRC-32 (IEEE 802.3) test vectors.
|
||||
@@ -15,6 +15,12 @@ describe('crc32', () => {
|
||||
})
|
||||
|
||||
describe('createZipArchive', () => {
|
||||
test('reads a stored source file from an archive', () => {
|
||||
const archive = createZipArchive([{name: 'index.js', content: 'exports.handler = async () => ({})'}])
|
||||
|
||||
expect(readStoredZipEntry(archive, 'index.js')).toBe('exports.handler = async () => ({})')
|
||||
expect(readStoredZipEntry(archive, 'missing.js')).toBeNull()
|
||||
})
|
||||
test('writes the ZIP magic number and end-of-central-directory record', () => {
|
||||
const archive = createZipArchive([{name: 'index.js', content: 'module.exports = 1'}])
|
||||
const view = new DataView(archive.buffer, archive.byteOffset, archive.byteLength)
|
||||
|
||||
Reference in New Issue
Block a user