Comparing version 0.6.0 to 0.7.0
@@ -8,5 +8,2 @@ import { RequestHandler, MockedRequest } from './requestHandler'; | ||
import { errors } from '../context/errors'; | ||
interface GraphQLRequestHandlerSelector { | ||
operation: RegExp | string; | ||
} | ||
declare type GraphQLMockedRequest<VariablesType = Record<string, any>> = MockedRequest & { | ||
@@ -24,5 +21,5 @@ variables: VariablesType; | ||
declare const _default: { | ||
query: <QueryType, VariablesType = Record<string, any>>(selector: GraphQLRequestHandlerSelector, resolver: GraphQLResponseResolver<QueryType, VariablesType>) => RequestHandler<GraphQLMockedContext<QueryType>>; | ||
mutation: <QueryType, VariablesType = Record<string, any>>(selector: GraphQLRequestHandlerSelector, resolver: GraphQLResponseResolver<QueryType, VariablesType>) => RequestHandler<GraphQLMockedContext<QueryType>>; | ||
query: <QueryType, VariablesType = Record<string, any>>(expectedOperation: import("../composeMocks").Mask, resolver: GraphQLResponseResolver<QueryType, VariablesType>) => RequestHandler<GraphQLMockedContext<QueryType>>; | ||
mutation: <QueryType, VariablesType = Record<string, any>>(expectedOperation: import("../composeMocks").Mask, resolver: GraphQLResponseResolver<QueryType, VariablesType>) => RequestHandler<GraphQLMockedContext<QueryType>>; | ||
}; | ||
export default _default; |
{ | ||
"name": "msw", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Deviation-less client-side runtime API mocking using Service Workers.", | ||
@@ -13,7 +13,7 @@ "main": "lib/index.js", | ||
"build": "cross-env NODE_ENV=production webpack", | ||
"test:unit": "cross-env BABEL_ENV=test jest", | ||
"test": "yarn run test:unit --runInBand", | ||
"test": "yarn test:unit && yarn test:integration", | ||
"test:unit": "cross-env BABEL_ENV=test jest --runInBand", | ||
"test:integration": "jest --config=test/jest.config.js --runInBand", | ||
"test:focused": "node_modules/.bin/ts-node --project=test/tsconfig.json test/focusedTest.ts", | ||
"prepublishOnly": "yarn test && yarn run build" | ||
"prepublishOnly": "yarn test && yarn build" | ||
}, | ||
@@ -20,0 +20,0 @@ "author": { |
Sorry, the diff of this file is too big to display
156434
4526