UNPKG

graphql-validity

Version:

Make business logic validation easy on the graphql side without adding any declarations or modifications to the existing graphql schema.

13 lines 500 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function mockModule(moduleToMock, defaultMockValuesForMock) { return (sandbox, returnOverrides) => { const functions = Object.keys(moduleToMock); const returns = returnOverrides || {}; functions.forEach((f) => { sandbox.stub(moduleToMock, f).callsFake(returns[f] || defaultMockValuesForMock[f]); }); }; } exports.mockModule = mockModule; //# sourceMappingURL=mocks.js.map