Skip to content

Commit

Permalink
Use default value of false for called variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Dec 11, 2024
1 parent ae8a237 commit 77c5aaa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/link/error/__tests__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe("error handling", () => {
}
`;

let called!: boolean;
let called = false;
const errorLink = onError(({ operation, networkError }) => {
expect(networkError!.message).toBe("app is crashing");
expect(operation.operationName).toBe("Foo");
Expand Down Expand Up @@ -111,7 +111,7 @@ describe("error handling", () => {
}
`;

let called!: boolean;
let called = false;
const errorLink = onError(({ operation, networkError }) => {
expect(networkError!.message).toBe("app is crashing");
expect(networkError!.name).toBe("ServerError");
Expand Down Expand Up @@ -146,7 +146,7 @@ describe("error handling", () => {
}
`;

let called!: boolean;
let called = false;
const errorLink = onError(({ graphQLErrors }) => {
expect(graphQLErrors).toBeUndefined();
called = true;
Expand Down Expand Up @@ -261,7 +261,7 @@ describe("error handling", () => {
}
`;

let called!: boolean;
let called = false;
const errorLink = onError(({ graphQLErrors, response, operation }) => {
expect(graphQLErrors![0].message).toBe("resolver blew up");
expect(response!.data!.foo).toBe(true);
Expand Down Expand Up @@ -303,7 +303,7 @@ describe("error handling with class", () => {
}
`;

let called!: boolean;
let called = false;
const errorLink = new ErrorLink(({ graphQLErrors, networkError }) => {
expect(graphQLErrors![0].message).toBe("resolver blew up");
called = true;
Expand Down Expand Up @@ -337,7 +337,7 @@ describe("error handling with class", () => {
}
`;

let called!: boolean;
let called = false;
const errorLink = new ErrorLink(({ networkError }) => {
expect(networkError!.message).toBe("app is crashing");
called = true;
Expand Down Expand Up @@ -365,7 +365,7 @@ describe("error handling with class", () => {
}
`;

let called!: boolean;
let called = false;
const errorLink = new ErrorLink(({ networkError }) => {
expect(networkError!.message).toBe("app is crashing");
called = true;
Expand Down

0 comments on commit 77c5aaa

Please sign in to comment.