-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Immutable pretty-format plugins for Immutable.OrderedSet and Immu… #2899
Changes from 11 commits
899ef77
0ad8b38
4c75854
2cd9b50
e981653
457d6b6
1e49f13
e7727d2
abf1523
bf7cf8a
c12b8ac
a4bdc74
1402e2d
81aebeb
0f58eb2
7d6143d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ import type {DiffOptions} from './diffStrings'; | |
const ReactElementPlugin = require('pretty-format/build/plugins/ReactElement'); | ||
const ReactTestComponentPlugin = require('pretty-format/build/plugins/ReactTestComponent'); | ||
const AsymmetricMatcherPlugin = require('pretty-format/build/plugins/AsymmetricMatcher'); | ||
const ImmutablePlugins = require('pretty-format/build/plugins/ImmutablePlugins'); | ||
|
||
const chalk = require('chalk'); | ||
const diffStrings = require('./diffStrings'); | ||
|
@@ -30,6 +31,7 @@ const PLUGINS = [ | |
ReactTestComponentPlugin, | ||
ReactElementPlugin, | ||
AsymmetricMatcherPlugin, | ||
...ImmutablePlugins, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will fail on Node 4, as array spread is supported only behind a flag. You can use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, looks like it works There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are right, it fails in circleCI. its fixed now. |
||
]; | ||
const FORMAT_OPTIONS = { | ||
plugins: PLUGINS, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,14 @@ | |
const chalk = require('chalk'); | ||
const prettyFormat = require('pretty-format'); | ||
const AsymmetricMatcherPlugin = require('pretty-format/build/plugins/AsymmetricMatcher'); | ||
const ReactElementPlugin = require('pretty-format/build/plugins/ReactElement'); | ||
const ImmutablePlugins = require('pretty-format/build/plugins/ImmutablePlugins'); | ||
|
||
const PLUGINS = [AsymmetricMatcherPlugin]; | ||
const PLUGINS = [ | ||
AsymmetricMatcherPlugin, | ||
ReactElementPlugin, | ||
...ImmutablePlugins, | ||
]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also use plugins in |
||
|
||
export type ValueType = | ||
| 'array' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you insert this in the right alphabetical location please?