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
Migrate conditional tests to gate pragma #18585
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 8cbba9a:
|
d72ab22
to
4358fe2
Compare
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.
Did not read closely. Scanned the diff and it seems okay.
TIL about it.each()
.
}); | ||
|
||
it('traces interaction across client-rendered hydration', async done => { | ||
// @gate experimental | ||
it('traces interaction across client-rendered hydration', async () => { |
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.
nit: I don't think this test needs to be async.
@@ -599,7 +600,8 @@ describe('ReactDOMTracing', () => { | |||
}); | |||
|
|||
describe('hydration', () => { | |||
it('traces interaction across hydration', async done => { | |||
// @gate experimental | |||
it('traces interaction across hydration', async () => { |
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.
nit: I don't think this test needs to be async.
Using a heuristic where I check a flag that is known to only be enabled in www. I left a TODO to instead set the release channel explicitly in each test config.
I searched through the codebase for this pattern: ```js describe('test suite', () => { if (!__EXPERIMENTAL__) { // or some other condition test("empty test so Jest doesn't complain", () => {}); return; } // Unless we're in experimental mode, none of the tests in this block // will run. }) ``` and converted them to the `@gate` pragma instead. The reason this pattern isn't preferred is because you end up disabling more tests than you need to.
2550b29
to
8cbba9a
Compare
Based on #18582
I split this up from the previous PR because the changes in here weren't completely automated. I had to manually edit stuff.
I searched through the codebase for this pattern:
and converted them to the
@gate
pragma instead.The reason this pattern isn't preferred is because you end up disabling more tests than you need to.
Quick review link