Skip to content

Commit

Permalink
Call consistent pretty-format plugins within Jest (#3800)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrottimark authored and cpojer committed Jun 27, 2017
1 parent 34942fd commit bd897bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/jest-diff/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ import diffStrings from './diff_strings';
import {NO_DIFF_MESSAGE, SIMILAR_MESSAGE} from './constants';

const {
ReactElement,
ReactTestComponent,
AsymmetricMatcher,
HTMLElement,
Immutable,
ReactElement,
ReactTestComponent,
} = prettyFormat.plugins;

const PLUGINS = [
ReactTestComponent,
ReactElement,
AsymmetricMatcher,
HTMLElement,
AsymmetricMatcher,
].concat(Immutable);
const FORMAT_OPTIONS = {
plugins: PLUGINS,
Expand Down
12 changes: 8 additions & 4 deletions packages/jest-matcher-utils/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ import getType from 'jest-get-type';
import prettyFormat from 'pretty-format';
const {
AsymmetricMatcher,
ReactElement,
HTMLElement,
Immutable,
ReactElement,
ReactTestComponent,
} = prettyFormat.plugins;

const PLUGINS = [AsymmetricMatcher, ReactElement, HTMLElement].concat(
Immutable,
);
const PLUGINS = [
ReactTestComponent,
ReactElement,
HTMLElement,
AsymmetricMatcher,
].concat(Immutable);

const EXPECTED_COLOR = chalk.green;
const EXPECTED_BG = chalk.bgGreen;
Expand Down

0 comments on commit bd897bf

Please sign in to comment.