Skip to content
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

[Tech debt/docs] Unit test updates #5075

Merged
merged 3 commits into from
Aug 25, 2021
Merged

Conversation

cee-chen
Copy link
Contributor

Summary

I'm writing unit tests for datagrid child components, and I like to run with the --coverage flag when writing tests to help me catch any branches or uncovered lines I may have forgotten. I noticed my coverage reports weren't what I expected, and updated our jest/config.json accordingly to account for most/all of our files now being .ts/.tsx.

I also noticed from our wiki docs that the commands we run have some outdated syntax that no longer apply - the run command isn't necessary with yarn, nor is the -- delineator. I've been running yarn test-unit data_grid -u --coverage --watch locally with no issues.

Checklist

N/A, dev/documentation only changes

- no need to specify `yarn run`
- no need for an extra `--` before passing in more flags
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5075/

- not to use sinon vs standard expect() syntax
- to have spacing that will better match what prettier will lint to
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5075/

Copy link
Contributor

@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.

📖

@cee-chen cee-chen merged commit fd6ec96 into elastic:master Aug 25, 2021
@cee-chen cee-chen deleted the unit-tests branch August 25, 2021 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants