refactor: lint
This commit is contained in:
@@ -5,7 +5,9 @@ describe("decodeB64StringToArrayBuffer", () => {
|
||||
test("decodes content correctly", () => {
|
||||
const decoder = new TextDecoder("utf-8")
|
||||
expect(
|
||||
decoder.decode(decodeB64StringToArrayBuffer("aG9wcHNjb3RjaCBpcyBhd2Vzb21lIQ=="))
|
||||
decoder.decode(
|
||||
decodeB64StringToArrayBuffer("aG9wcHNjb3RjaCBpcyBhd2Vzb21lIQ==")
|
||||
)
|
||||
).toMatch("hoppscotch is awesome!")
|
||||
})
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ describe("isJSONContentType", () => {
|
||||
|
||||
test("returns true for JSON types with charset specified", () => {
|
||||
expect(isJSONContentType("application/json; charset=utf-8")).toBe(true)
|
||||
expect(isJSONContentType("application/vnd.api+json; charset=utf-8")).toBe(true)
|
||||
expect(isJSONContentType("application/vnd.api+json; charset=utf-8")).toBe(
|
||||
true
|
||||
)
|
||||
expect(isJSONContentType("application/hal+json; charset=utf-8")).toBe(true)
|
||||
expect(isJSONContentType("application/ld+json; charset=utf-8")).toBe(true)
|
||||
})
|
||||
@@ -25,7 +27,9 @@ describe("isJSONContentType", () => {
|
||||
test("returns false for non-JSON content types with charset", () => {
|
||||
expect(isJSONContentType("application/xml; charset=utf-8")).toBe(false)
|
||||
expect(isJSONContentType("text/html; charset=utf-8")).toBe(false)
|
||||
expect(isJSONContentType("application/x-www-form-urlencoded; charset=utf-8")).toBe(false)
|
||||
expect(
|
||||
isJSONContentType("application/x-www-form-urlencoded; charset=utf-8")
|
||||
).toBe(false)
|
||||
expect(isJSONContentType("foo/jsoninword; charset=utf-8")).toBe(false)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user