Inverted the mocking approach#11
Merged
thompsongl merged 1 commit intothompsongl:internal-testenvfrom Feb 25, 2020
Merged
Conversation
thompsongl
approved these changes
Feb 25, 2020
Owner
thompsongl
left a comment
There was a problem hiding this comment.
Good catch with EuiEmptyPrompt. I'm good with this approach 👍
thompsongl
pushed a commit
that referenced
this pull request
Jun 5, 2020
* Added EuiTextDiff component * fixed sass-linting * removed unwanted exports * improved Examples, exported all data from component * used useMemo * exported props,used for loop * allow user to pass components * yarn.lock updated and deletion component used for example * used id as key, useMemos combined * removed disableTimeout prop * used useMemo for renderedHtml * Changed slider steps to display result * tranformed to hook * removed padding , fontSize controll from euiText * removed unnecessay props * used EuiTextDiffProps and removed Funcion def * used ElementType * Used diff inside useMemo * populated text-diff module defination * Update src-docs/src/views/code/code_example.js Co-authored-by: Chandler Prall <chandler.prall@gmail.com> * used _colors and eui_colors_dark.scss for text diff, changed slider props * valueAppend used * more detailed timeout description * insertions/dels are recalculated, improved custom components desc * console.log removed * created separate section for text diff * Update src-docs/src/views/text_diff/text_diff_example.js Co-authored-by: Chandler Prall <chandler.prall@gmail.com> * setDel , setIns to zero on value change * Update src-docs/src/views/text_diff/text_diff_timeout.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/text_diff/text_diff_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/text_diff/text_diff_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/text_diff/text_diff_custom_components.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src/components/code/text_diff.tsx Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/text_diff/text_diff_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/text_diff/text_diff_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/text_diff/text_diff_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/text_diff/text_diff_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/text_diff/text_diff_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * updated custom-components name, added clasName prop, updated text for examples, removed unnecessary info from examples,moved to utilities * moved to own folder * handled props directly * over rides eslint * resolved conflicts * Update .eslintrc.js * added licence * used license for all files * removed default wraper from * removed timeout example * Some design/docs additions (#11) - Adding prop comments - Fixing text contrast - Adding snippets - Added “NEW” badge * added test, CL, updated branch * updated test * fixed snaps * snaps * linting fixed * Update CHANGELOG.md Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Chandler Prall <chandler.prall@gmail.com> Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What do you think of this approach? Using
moduleNameMapperto specify the mock appears to be more predictable (e.g. for some reason Jest didn't mock icon forEuiEmptyPrompt.)