Skip to content

Commit

Permalink
import require only in ts
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 9, 2019
1 parent 0703f83 commit 5410640
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion packages/jest-core/src/__tests__/watch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

import chalk = require('chalk');
import chalk from 'chalk';
import TestWatcher from '../TestWatcher';
import {JestHook, KEYS} from 'jest-watcher';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

import chalk = require('chalk');
import chalk from 'chalk';
import {KEYS} from 'jest-watcher';

const runJestMock = jest.fn();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

import chalk = require('chalk');
import chalk from 'chalk';
import {KEYS} from 'jest-watcher';

const runJestMock = jest.fn();
Expand Down
6 changes: 3 additions & 3 deletions packages/jest-diff/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-reporters/src/__tests__/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit 5410640

Please sign in to comment.