handler.test.ts
This file
Path
src/adapter/lambda-edge/handler.test.ts
15 lines 路 724 bytes 路 TypeScript
Last changed by
feat(adapter): AWS Lambda Adapter supports requests via Lambda@edge (#1210)watanybefore adoptionedca699
History of this fileTake it
12345678910111213141516import { isContentTypeBinary } from './handler'
describe('isContentTypeBinary', () => { it('Should determine whether it is binary', () => { expect(isContentTypeBinary('image/png')).toBe(true) expect(isContentTypeBinary('font/woff2')).toBe(true) expect(isContentTypeBinary('text/plain')).toBe(false) expect(isContentTypeBinary('text/plain; charset=UTF-8')).toBe(false) expect(isContentTypeBinary('text/css')).toBe(false) expect(isContentTypeBinary('text/javascript')).toBe(false) expect(isContentTypeBinary('application/json')).toBe(false) expect(isContentTypeBinary('application/ld+json')).toBe(false) expect(isContentTypeBinary('application/json; charset=UTF-8')).toBe(false) })})