-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
chore(package): switch to Jest #2971
Conversation
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
@levithomason it's interesting, but Jest is much slower than our existing solution. I've pulled
I think that it's quite slow. Did I miss something? |
Strange, I have no idea. @davezuko? |
Maybe a Windows issue? The test suite runs in 8s for me on a cold start, and 4.75 on subsequent runs. |
SUIRI will try to update tests for Our existing suite is running 02:26: https://circleci.com/gh/Semantic-Org/Semantic-UI-React/5649 Current suite (
There are many failed tests, but it looks very poorly. |
Stardust
Looks bad to me, too. |
I'm worried that after switching to Jest, our tests will be performed substantially longer. If I omit Babel and write code/tests in raw JS, tests are running blazing fast. Looks like Babel has a cold start on each test 🤔 |
…React into chore/jest Signed-off-by: Oleksandr Fediashov <[email protected]> # Conflicts: # test/specs/elements/Input/Input-test.js
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
…React into chore/jest Signed-off-by: Oleksandr Fediashov <[email protected]> # Conflicts: # test/specs/lib/eventStack/EventPool-test.js # test/specs/lib/eventStack/EventStack-test.js
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
.circleci/config.yml
Outdated
@@ -45,7 +45,7 @@ jobs: | |||
command: yarn lint | |||
- run: | |||
name: Test JavaScript | |||
command: yarn test | |||
command: yarn test --runInBand |
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.
This is the cause of slow tests, as they are run serially. Try to leverage number of cores you can use on your CI, try different ones, e.g. yarn test -w=4
for 4 parallel workers. Some CIs are better and some worse in using multiple cores, that's why you need to play with it a bit
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.
https://circleci.com/gh/Semantic-Org/Semantic-UI-React/5711
Removal of this option causes build failure. Also, microsoft/fluent-ui-react#53
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.
That's why I was talking about using certain number of workers, not all available (depending on CI, it can tell Jest it has even 128 cpus). You should be good to run jest without flags locally, as you probably have up to 8 cores and enough memory.
Codecov Report
@@ Coverage Diff @@
## master #2971 +/- ##
===========================================
- Coverage 99.96% 67.67% -32.29%
===========================================
Files 163 76 -87
Lines 2743 1324 -1419
Branches 0 229 +229
===========================================
- Hits 2742 896 -1846
- Misses 1 428 +427
Continue to review full report at Codecov.
|
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
Signed-off-by: Oleksandr Fediashov <[email protected]>
WIP