Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
t1nky committed Feb 28, 2024
1 parent 341f6df commit 6648d3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/common/get-base-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ export function getBaseUrl(options: CreateApiHandlerOptions) {
return baseUrl.replace(/\/$/, "")
}
export { CreateApiHandlerOptions }

13 changes: 6 additions & 7 deletions src/next-edge/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
createApiHandler,
filterRequestHeaders,
} from "./index"
import { createApiHandler, filterRequestHeaders } from "./index"
import express from "express"
import { NextApiRequest, NextApiResponse } from "next"
import supertest from "supertest"
Expand Down Expand Up @@ -290,10 +287,12 @@ describe("filterRequestHeaders", () => {
"x-custom": "some",
}

expect(filterRequestHeaders(headers).get('accept')).toEqual("application/json")
expect(filterRequestHeaders(headers).get("accept")).toEqual(
"application/json",
)

const customHeader = filterRequestHeaders(headers, ["x-custom"])
expect(customHeader.get('accept')).toEqual("application/json")
expect(customHeader.get('x-custom')).toEqual("some")
expect(customHeader.get("accept")).toEqual("application/json")
expect(customHeader.get("x-custom")).toEqual("some")
})
})

0 comments on commit 6648d3c

Please sign in to comment.