Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/graphql-testing

Package Overview
Dependencies
Maintainers
19
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/graphql-testing - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1-address-mocks-minified-beta.0

4

build/ts/links/inflight.js

@@ -12,3 +12,3 @@ import { ApolloLink, Observable, } from 'apollo-link';

let resolver;
const promise = new Promise(resolve => {
const promise = new Promise((resolve) => {
resolver = resolve;

@@ -25,3 +25,3 @@ });

this.options.onCreated(request);
return new Observable(observer => {
return new Observable((observer) => {
return nextLink(operation).subscribe({

@@ -28,0 +28,0 @@ complete() {

@@ -12,3 +12,3 @@ import { ApolloLink, Observable } from 'apollo-link';

request(operation) {
return new Observable(obs => {
return new Observable((obs) => {
const { mock } = this;

@@ -34,3 +34,3 @@ const { operationName = '' } = operation;

// not an object mapping names to fixtures.
const looksLikeDataNotFixtures = operationNames.every(name => name === name.toLowerCase());
const looksLikeDataNotFixtures = operationNames.every((name) => name === name.toLowerCase());
message += looksLikeDataNotFixtures

@@ -37,0 +37,0 @@ ? ` (it looks like you tried to provide data directly to the mock GraphQL client. You need to provide your fixture on the key that matches its operation name. To fix this, simply change your code to read 'mockGraphQLClient({${operationName}: yourFixture}).'`

@@ -14,3 +14,3 @@ import { matcherHint, printExpected, EXPECTED_COLOR as expectedColor, } from 'jest-matcher-utils';

? foundByOperation
: foundByOperation.filter(operation => Object.keys(variables).every(key => this.equals(variables[key], operation.variables[key])));
: foundByOperation.filter((operation) => Object.keys(variables).every((key) => this.equals(variables[key], operation.variables[key])));
const pass = foundByVariables.length > 0;

@@ -17,0 +17,0 @@ const type = operationTypeFromDocument(document) || 'query';

@@ -29,4 +29,4 @@ import { diff, matcherErrorMessage, matcherHint, RECEIVED_COLOR as receivedColor, printWithType, printReceived, } from 'jest-matcher-utils';

Object.keys(subset)
.filter(key => Reflect.has(object, key))
.forEach(key => (trimmed[key] = getObjectSubset(object[key], subset[key])));
.filter((key) => Reflect.has(object, key))
.forEach((key) => (trimmed[key] = getObjectSubset(object[key], subset[key])));
if (Object.keys(trimmed).length > 0) {

@@ -33,0 +33,0 @@ return trimmed;

{
"name": "@shopify/graphql-testing",
"version": "5.0.0",
"version": "5.0.1-address-mocks-minified-beta.0",
"license": "MIT",

@@ -34,3 +34,3 @@ "description": "Utilities to create mock GraphQL factories",

"devDependencies": {
"@shopify/useful-types": "^3.0.0",
"@shopify/useful-types": "^3.0.1-address-mocks-minified-beta.0",
"graphql-typed": "^1.0.0"

@@ -65,3 +65,3 @@ },

},
"gitHead": "40de4af181104f298cbab42d2d3d68e228a9a31a"
"gitHead": "1a19759d10db9ca65d346141b10e7b0654e023e6"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc