handler.test.ts
This file
Path
src/adapter/lambda-edge/handler.test.ts
17 lines · 861 bytes · TypeScript
Last changed by
fix: add missing tail to svg regex (#1788)Elias Brangebefore adoption521db64
History of this fileTake it
The walk stopped after 200 commits: lines older than 2f9a07d point at it.
perf(hono-base): use `instanceOf` (#1565)Yusuke Wadabefore adoption2f9a07d
lines 1–6why, one step back1import { isContentTypeBinary } from './handler'23describe('isContentTypeBinary', () => {4 it('Should determine whether it is binary', () => {5 expect(isContentTypeBinary('image/png')).toBe(true)6 expect(isContentTypeBinary('font/woff2')).toBe(true)fix: add missing tail to svg regex (#1788)Elias Brangebefore adoption521db64
lines 7–8why, one step back7 expect(isContentTypeBinary('image/svg+xml')).toBe(false)8 expect(isContentTypeBinary('image/svg+xml; charset=UTF-8')).toBe(false)perf(hono-base): use `instanceOf` (#1565)Yusuke Wadabefore adoption2f9a07d
lines 9–17why, one step back9 expect(isContentTypeBinary('text/plain')).toBe(false)10 expect(isContentTypeBinary('text/plain; charset=UTF-8')).toBe(false)11 expect(isContentTypeBinary('text/css')).toBe(false)12 expect(isContentTypeBinary('text/javascript')).toBe(false)13 expect(isContentTypeBinary('application/json')).toBe(false)14 expect(isContentTypeBinary('application/ld+json')).toBe(false)15 expect(isContentTypeBinary('application/json; charset=UTF-8')).toBe(false)16 })17})