Skip to content

Comments

Inverted the mocking approach#11

Merged
thompsongl merged 1 commit intothompsongl:internal-testenvfrom
chandlerprall:internal-testenv-alternative
Feb 25, 2020
Merged

Inverted the mocking approach#11
thompsongl merged 1 commit intothompsongl:internal-testenvfrom
chandlerprall:internal-testenv-alternative

Conversation

@chandlerprall
Copy link

What do you think of this approach? Using moduleNameMapper to specify the mock appears to be more predictable (e.g. for some reason Jest didn't mock icon for EuiEmptyPrompt.)

Copy link
Owner

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch with EuiEmptyPrompt. I'm good with this approach 👍

@thompsongl thompsongl merged commit 9b37da9 into thompsongl:internal-testenv Feb 25, 2020
@chandlerprall chandlerprall deleted the internal-testenv-alternative branch February 25, 2020 16:11
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants