-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #506 from madisonbikes/dependabot/npm_and_yarn/dev…
…elop/supertest-and-types/supertest-6.3.4 chore: bump supertest and @types/supertest
- Loading branch information
Showing
4 changed files
with
33 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import supertest from "supertest"; | ||
import { runningPhotoServer, Server } from "."; | ||
import TestAgent from "supertest/lib/agent"; | ||
export { Server } from "http"; | ||
|
||
/** helper type alias for supertest request object */ | ||
export type TestRequest = supertest.SuperTest<supertest.Test>; | ||
export type TestRequest = TestAgent; | ||
|
||
/** helper function to build a supertest test request from a server object */ | ||
export const testRequest = (server?: Server): TestRequest => { | ||
export const testRequest = (server?: Server) => { | ||
const s = server ?? runningPhotoServer; | ||
return supertest.agent(s); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters