mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Fix ownerStackLimit feature gating for tests (#32726)
https://github.com/facebook/react/pull/32529 added a dynamic flag for this, but that breaks tests since the flags are not defined everywhere. However, this is a static value and the flag is only for supporting existing tests. So we can override it in the test config, and make it static at built time instead.
This commit is contained in:
@@ -17,6 +17,9 @@ jest.mock('shared/ReactFeatureFlags', () => {
|
||||
// we remove the flag.
|
||||
actual.disableClientCache = __VARIANT__;
|
||||
|
||||
// Some value that doesn't impact existing tests
|
||||
actual.ownerStackLimit = __VARIANT__ ? 500 : 1e4;
|
||||
|
||||
return actual;
|
||||
});
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ jest.mock('shared/ReactFeatureFlags', () => {
|
||||
actual.enableScopeAPI = true;
|
||||
actual.enableTaint = false;
|
||||
|
||||
// Some value that doesn't impact existing tests
|
||||
actual.ownerStackLimit = __VARIANT__ ? 500 : 1e4;
|
||||
|
||||
return actual;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user