Skip to content

Commit

Permalink
replace SetupWorkerApi with SetupWorker
Browse files Browse the repository at this point in the history
  • Loading branch information
jtoar committed Jan 25, 2023
1 parent 4fd9dca commit f7717eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/testing/src/web/mockRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import {
GraphQLRequest,
ResponseTransformer,
MockedResponse,
SetupWorkerApi,
SetupWorker,
ResponseComposition,
DefaultBodyType,
} from 'msw'
import type { StartOptions as StartMSWWorkerOptions } from 'msw'
import type { SharedOptions as SharedMSWOptions } from 'msw'
Expand All @@ -17,7 +18,7 @@ import type { SharedOptions as SharedMSWOptions } from 'msw'
// before the server has started. We store the request handlers in
// a queue that is drained once the server is started.
let REQUEST_HANDLER_QUEUE: RequestHandler[] = []
let SERVER_INSTANCE: SetupWorkerApi | any
let SERVER_INSTANCE: SetupWorker | any

/**
* Plugs fetch for the correct target in order to capture requests.
Expand Down Expand Up @@ -86,7 +87,7 @@ export type DataFunction<
) => Query | void

// These should get exported from MSW
type ResponseFunction<BodyType = any> = (
type ResponseFunction<BodyType extends DefaultBodyType> = (
...transformers: ResponseTransformer<BodyType>[]
) => MockedResponse<BodyType>

Expand Down

0 comments on commit f7717eb

Please sign in to comment.