-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 each to jest-cirucs #6309
Add each to jest-cirucs #6309
Conversation
@@ -14,10 +14,8 @@ const runJest = require('../runJest'); | |||
const {extractSummary} = require('../Utils'); | |||
const dir = path.resolve(__dirname, '../each'); | |||
const SkipOnWindows = require('../../scripts/SkipOnWindows'); | |||
const SkipOnJestCircus = require('../../scripts/SkipOnJestCircus'); | |||
|
|||
SkipOnWindows.suite(); |
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.
btw, do we need skipping it on windows?
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.
I think we tried removing this before and it failed 🤷♂️
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.
See #6102 (comment)
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.
we should probably add a helper fixing the differing symbols on windows and unix so that the integration tests can run. separate issue, though
packages/jest-each/src/index.js
Outdated
import bind from './bind'; | ||
import arrayEach from './array'; | ||
import templateEach from './template'; | ||
|
||
const each = (...args) => { | ||
const each = (...args: any) => { |
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 we use mixed
type here?
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.
I’m AFK at the moment, I’ll update this later tonight when I get home or in another PR I’ve got a few refactors/improvements I want to make with the each code 😄
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.
Just tried to update to mixed
and got the following flow error when trying to access args.length
. I think it is fine to leave it as any
Cannot get `args.length` because property `length` is missing in mixed [1]. (index.js:15:12)
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.
Oh, I think Array<mixed>
should do the trick here, cause args
is an array. Or we can be fancy and use $ReadOnlyArray<*>
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.
Nice just updated :)
Failed circus on CI 😭 |
Green! Waiting on appveyor, but that doesn't run the each tests anyways |
Codecov Report
@@ Coverage Diff @@
## master #6309 +/- ##
==========================================
+ Coverage 63.64% 63.67% +0.02%
==========================================
Files 227 227
Lines 8638 8644 +6
Branches 3 4 +1
==========================================
+ Hits 5498 5504 +6
Misses 3139 3139
Partials 1 1
Continue to review full report at Codecov.
|
@@ -4,6 +4,7 @@ | |||
|
|||
### Chore & Maintenance | |||
|
|||
* `[jest-circus]` Add dependency on jest-each ([#6309](https://github.com/facebook/jest/pull/#6309)) |
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 now part of master, not 23.0.1
😅
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.
Fixed :)
please rebase. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Add each to
jest-cirucs
Test plan
describe.only.each
anddescribe.skip.each
tests