graphql-query-test-mock
Advanced tools
Comparing version 0.12.0 to 0.12.1
@@ -5,2 +5,10 @@ # Changelog | ||
... | ||
## 0.12.1 | ||
- Fix memory leak issue (thanks @msimulcik!). | ||
## 0.12.0 | ||
- Add `graphqlErrors` prop to query mock config, to support returning actual GraphQL errors, and not just server errors. | ||
@@ -7,0 +15,0 @@ |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports.defaultChangeServerResponseFn = exports.DEFAULT_CONFIG = void 0; | ||
// strict | ||
const DEFAULT_CONFIG = { | ||
@@ -10,0 +9,0 @@ matchOnVariables: true, |
@@ -20,3 +20,2 @@ "use strict"; | ||
// strict | ||
function getNockRequestHandlerFn(queryMock) { | ||
@@ -23,0 +22,0 @@ return function handleNockRequest(uri, data, cb) { |
@@ -10,3 +10,2 @@ "use strict"; | ||
// strict | ||
function getOperationNameFromQuery(query) { | ||
@@ -13,0 +12,0 @@ try { |
@@ -15,3 +15,2 @@ "use strict"; | ||
// strict | ||
function printNoMockFoundError(queryMock, operationName, variables) { | ||
@@ -18,0 +17,0 @@ const errorMessageArray = getNoMockFoundErrorMessageArray(queryMock, operationName, variables); |
@@ -163,2 +163,4 @@ "use strict"; | ||
_nock.default.enableNetConnect(); | ||
_nock.default.restore(); | ||
} | ||
@@ -165,0 +167,0 @@ |
@@ -16,4 +16,6 @@ "use strict"; | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -38,3 +40,3 @@ | ||
variables: {} | ||
}, _defaults.DEFAULT_CONFIG, config); | ||
}, _defaults.DEFAULT_CONFIG, {}, config); | ||
@@ -41,0 +43,0 @@ let ignoreThesePropertiesInVariables = queryMockConfig.ignoreThesePropertiesInVariables || []; |
{ | ||
"name": "graphql-query-test-mock", | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"author": "Gabriel Nordeborn", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
309018
393