refactor: lint

This commit is contained in:
liyasthomas
2021-05-18 14:57:29 +05:30
parent 7f248da0b3
commit cc27c552af
84 changed files with 1444 additions and 973 deletions

View File

@@ -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!")
})

View File

@@ -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)
})