wildcard-mock-link
Advanced tools
Comparing version 2.0.0-rc.1 to 2.0.0-rc.2
@@ -116,3 +116,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
if (!regularMock) { | ||
throw new Error(`No mocks matched: ${op.operationName}`); | ||
const errorString = `No mocks matched ${op.operationName}: ${print(op.query)}, variables: ${JSON.stringify(op.variables)}`; | ||
console.warn(errorString); | ||
throw new Error(errorString); | ||
} | ||
@@ -141,3 +143,5 @@ else if (!regularMock.error && !regularMock.result) { | ||
if (!regularMock) { | ||
throw new Error(`No mocks matched: ${op.operationName}`); | ||
const errorString = `No mocks matched ${op.operationName}: ${print(op.query)}, variables: ${JSON.stringify(op.variables)}`; | ||
console.warn(errorString); | ||
throw new Error(errorString); | ||
} | ||
@@ -144,0 +148,0 @@ return new Observable((observer) => { |
@@ -182,3 +182,5 @@ "use strict"; | ||
if (!regularMock_1) { | ||
throw new Error("No mocks matched: " + op.operationName); | ||
var errorString = "No mocks matched " + op.operationName + ": " + graphql_1.print(op.query) + ", variables: " + JSON.stringify(op.variables); | ||
console.warn(errorString); | ||
throw new Error(errorString); | ||
} | ||
@@ -208,3 +210,5 @@ else if (!regularMock_1.error && !regularMock_1.result) { | ||
if (!regularMock_2) { | ||
throw new Error("No mocks matched: " + op.operationName); | ||
var errorString = "No mocks matched " + op.operationName + ": " + graphql_1.print(op.query) + ", variables: " + JSON.stringify(op.variables); | ||
console.warn(errorString); | ||
throw new Error(errorString); | ||
} | ||
@@ -211,0 +215,0 @@ return new client_1.Observable(function (observer) { |
@@ -174,3 +174,5 @@ var __extends = (this && this.__extends) || (function () { | ||
if (!regularMock_1) { | ||
throw new Error("No mocks matched: " + op.operationName); | ||
var errorString = "No mocks matched " + op.operationName + ": " + print(op.query) + ", variables: " + JSON.stringify(op.variables); | ||
console.warn(errorString); | ||
throw new Error(errorString); | ||
} | ||
@@ -200,3 +202,5 @@ else if (!regularMock_1.error && !regularMock_1.result) { | ||
if (!regularMock_2) { | ||
throw new Error("No mocks matched: " + op.operationName); | ||
var errorString = "No mocks matched " + op.operationName + ": " + print(op.query) + ", variables: " + JSON.stringify(op.variables); | ||
console.warn(errorString); | ||
throw new Error(errorString); | ||
} | ||
@@ -203,0 +207,0 @@ return new Observable(function (observer) { |
{ | ||
"name": "wildcard-mock-link", | ||
"version": "2.0.0-rc.1", | ||
"version": "2.0.0-rc.2", | ||
"description": "apollo client mocking", | ||
@@ -5,0 +5,0 @@ "author": "insidewhy <github@chilon.net>", |
@@ -196,3 +196,7 @@ import { | ||
if (!regularMock) { | ||
throw new Error(`No mocks matched: ${op.operationName}`) | ||
const errorString = `No mocks matched ${op.operationName}: ${print( | ||
op.query, | ||
)}, variables: ${JSON.stringify(op.variables)}` | ||
console.warn(errorString) | ||
throw new Error(errorString) | ||
} else if (!regularMock.error && !regularMock.result) { | ||
@@ -223,3 +227,7 @@ throw new Error('Must provide error or result for query/mutation mocks') | ||
if (!regularMock) { | ||
throw new Error(`No mocks matched: ${op.operationName}`) | ||
const errorString = `No mocks matched ${op.operationName}: ${print( | ||
op.query, | ||
)}, variables: ${JSON.stringify(op.variables)}` | ||
console.warn(errorString) | ||
throw new Error(errorString) | ||
} | ||
@@ -226,0 +234,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
257731
3997