@quyse/client-zip
Version:
A tiny and fast client-side streaming ZIP generator
12 lines (10 loc) • 442 B
text/typescript
import { assertEquals } from "https://deno.land/std@0.132.0/testing/asserts.ts"
import { formatDOSDateTime } from "../src/datetime.ts"
import { makeBuffer } from "../src/utils.ts"
Deno.test("the datetime encoding to local 32-bit DOS format", () => {
const date = new Date("2020-02-15T11:24:18")
const actual = makeBuffer(4)
formatDOSDateTime(date, actual)
const expected = 0x095b4f50
assertEquals(actual.getUint32(0), expected)
})