forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up test infra for dynamic Scheduler flags (facebook#22139)
I copied the set up we use for React. In the www-variant test job, the Scheduler `__VARIANT__` flags will be `true`. When writing a test, we can read the value of the flag with the `gate` pragma and method. Note: Since these packages are currently released in lockstep, maybe we should remove SchedulerFeatureFlags and use ReactFeatureFlags for both.
- Loading branch information
Showing
5 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/scheduler/src/forks/SchedulerFeatureFlags.www-dynamic.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
*/ | ||
|
||
// In www, these flags are controlled by GKs. Because most GKs have some | ||
// population running in either mode, we should run our tests that way, too, | ||
// | ||
// Use __VARIANT__ to simulate a GK. The tests will be run twice: once | ||
// with the __VARIANT__ set to `true`, and once set to `false`. | ||
|
||
export const enableIsInputPending = __VARIANT__; | ||
export const enableSchedulerDebugging = __VARIANT__; | ||
export const enableProfiling = __VARIANT__; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters