Skip to content

Commit 4f5aa95

Browse files
committed
Update chalk testing usages
1 parent 3d897c7 commit 4f5aa95

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/apollo/src/commands/service/__tests__/check.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import chalk from "chalk";
99
import { stdout } from "stdout-stderr";
1010
import * as graphql from "graphql";
1111
import { graphqlTypes } from "apollo-language-server";
12-
import nock = require("nock");
12+
import nock from "nock";
1313
import stripAnsi from "strip-ansi";
1414

1515
/**
@@ -380,11 +380,11 @@ const mockPartialSchemaCheckFailure = () => {
380380
};
381381

382382
describe("service:check", () => {
383-
let originalChalkEnabled;
383+
let originalChalkSupportsColor;
384384

385385
beforeEach(() => {
386-
originalChalkEnabled = chalk.enabled;
387-
chalk.enabled = false;
386+
originalChalkSupportsColor = chalk.supportsColor;
387+
chalk.supportsColor = false;
388388

389389
// Clean console log capturing before tests in the event that `afterEach` was not run successfully.
390390
uncaptureApplicationOutput();
@@ -404,7 +404,7 @@ describe("service:check", () => {
404404
});
405405

406406
afterEach(() => {
407-
chalk.enabled = originalChalkEnabled;
407+
chalk.supportsColor = originalChalkSupportsColor;
408408

409409
// Clean up console log mocking
410410
uncaptureApplicationOutput();

0 commit comments

Comments
 (0)