diff --git a/packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js b/packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js index 9a4be4e83be6..3b3f1bb7c177 100644 --- a/packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js +++ b/packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import chalk = require('chalk'); +import chalk from 'chalk' import {KEYS} from 'jest-watcher'; import SnapshotInteractiveMode from '../SnapshotInteractiveMode'; diff --git a/packages/jest-core/src/__tests__/watch.test.js b/packages/jest-core/src/__tests__/watch.test.js index 4c9234d8509f..1b55f71df8af 100644 --- a/packages/jest-core/src/__tests__/watch.test.js +++ b/packages/jest-core/src/__tests__/watch.test.js @@ -8,7 +8,7 @@ 'use strict'; -import chalk = require('chalk'); +import chalk from 'chalk' import TestWatcher from '../TestWatcher'; import {JestHook, KEYS} from 'jest-watcher'; diff --git a/packages/jest-core/src/__tests__/watch_filename_pattern_mode.test.js b/packages/jest-core/src/__tests__/watch_filename_pattern_mode.test.js index 089f27140705..7cf924acd6bc 100644 --- a/packages/jest-core/src/__tests__/watch_filename_pattern_mode.test.js +++ b/packages/jest-core/src/__tests__/watch_filename_pattern_mode.test.js @@ -8,7 +8,7 @@ 'use strict'; -import chalk = require('chalk'); +import chalk from 'chalk' import {KEYS} from 'jest-watcher'; const runJestMock = jest.fn(); diff --git a/packages/jest-core/src/__tests__/watch_test_name_pattern_mode.test.js b/packages/jest-core/src/__tests__/watch_test_name_pattern_mode.test.js index 835facb87fba..ed8bd206229d 100644 --- a/packages/jest-core/src/__tests__/watch_test_name_pattern_mode.test.js +++ b/packages/jest-core/src/__tests__/watch_test_name_pattern_mode.test.js @@ -8,7 +8,7 @@ 'use strict'; -import chalk = require('chalk'); +import chalk from 'chalk' import {KEYS} from 'jest-watcher'; const runJestMock = jest.fn(); diff --git a/packages/jest-diff/README.md b/packages/jest-diff/README.md index f8888e94b7f0..f63843ce8f3c 100644 --- a/packages/jest-diff/README.md +++ b/packages/jest-diff/README.md @@ -429,7 +429,7 @@ The `jest-diff` package does not assume that the 2 labels have equal length. For consistency with most diff tools, you might exchange the colors: -```js +```ts import chalk = require('chalk'); const options = { @@ -442,7 +442,7 @@ const options = { Although the default inverse of foreground and background colors is hard to beat for changed substrings **within lines**, especially because it highlights spaces, if you want bold font weight on yellow background color: -```js +```ts import chalk = require('chalk'); const options = { @@ -532,7 +532,7 @@ A patch mark like `@@ -12,7 +12,9 @@` accounts for omitted common lines. If you want patch marks to have the same dim color as common lines: -```js +```ts import chalk = require('chalk'); const options = { diff --git a/packages/jest-reporters/src/__tests__/utils.test.js b/packages/jest-reporters/src/__tests__/utils.test.js index 04b5a4976cff..52e1802502cb 100644 --- a/packages/jest-reporters/src/__tests__/utils.test.js +++ b/packages/jest-reporters/src/__tests__/utils.test.js @@ -6,7 +6,7 @@ */ import path from 'path'; -import chalk = require('chalk'); +import chalk from 'chalk' import stripAnsi from 'strip-ansi'; import {printDisplayName, trimAndFormatPath, wrapAnsiString} from '../utils';