Skip to content

Commit

Permalink
Clean up disableDOMTestUtils (facebook#29610)
Browse files Browse the repository at this point in the history
`disableDOMTestUtils` and the FB build `ReactTestUtilsFB` allowed us to
finish migrating internal callsites off of ReactTestUtils. Now that
usage is cleaned up, we can remove the flag, build artifact, and test
coverage for the deprecated utility methods.
  • Loading branch information
jackpope authored and nikeee committed May 28, 2024
1 parent fe95af9 commit c600b63
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 1,640 deletions.
735 changes: 0 additions & 735 deletions packages/react-dom/src/__tests__/ReactTestUtils-test.js

This file was deleted.

884 changes: 0 additions & 884 deletions packages/react-dom/src/test-utils/ReactTestUtilsFB.js

This file was deleted.

10 changes: 0 additions & 10 deletions packages/react-dom/test-utils.fb.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/shared/ReactFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ export const enableReactTestRendererWarning = true;
// before removing them in stable in the next Major
export const disableLegacyMode = true;

export const disableDOMTestUtils = true;

// Make <Context> equivalent to <Context.Provider> instead of <Context.Consumer>
export const enableRenderableContext = true;

Expand Down
2 changes: 0 additions & 2 deletions packages/shared/forks/ReactFeatureFlags.native-fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ export const disableStringRefs = true;

export const enableReactTestRendererWarning = false;
export const disableLegacyMode = false;
export const disableDOMTestUtils = false;

export const enableOwnerStacks = false;

// Flow magic to verify the exports of this file match the original version.
Expand Down
1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.native-oss.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const enableRefAsProp = __TODO_NEXT_RN_MAJOR__;
export const disableStringRefs = __TODO_NEXT_RN_MAJOR__;
export const enableFastJSX = __TODO_NEXT_RN_MAJOR__;
export const disableLegacyMode = __TODO_NEXT_RN_MAJOR__;
export const disableDOMTestUtils = __TODO_NEXT_RN_MAJOR__;
export const useModernStrictMode = __TODO_NEXT_RN_MAJOR__;
export const enableReactTestRendererWarning = __TODO_NEXT_RN_MAJOR__;
export const enableAsyncActions = __TODO_NEXT_RN_MAJOR__;
Expand Down
1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.test-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ export const disableStringRefs = true;
export const enableFastJSX = true;
export const disableLegacyMode = true;
export const disableLegacyContext = true;
export const disableDOMTestUtils = true;
export const enableRenderableContext = true;
export const enableReactTestRendererWarning = true;
export const disableDefaultPropsExceptForClasses = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export const enableFastJSX = true;

export const enableReactTestRendererWarning = false;
export const disableLegacyMode = false;
export const disableDOMTestUtils = false;

export const disableDefaultPropsExceptForClasses = false;
export const enableAddPropertiesFastPath = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export const enableFastJSX = false;

export const enableReactTestRendererWarning = false;
export const disableLegacyMode = false;
export const disableDOMTestUtils = false;

export const disableDefaultPropsExceptForClasses = false;
export const enableAddPropertiesFastPath = false;
Expand Down
2 changes: 0 additions & 2 deletions packages/shared/forks/ReactFeatureFlags.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ export const disableStringRefs = false;

export const disableLegacyMode = __EXPERIMENTAL__;

export const disableDOMTestUtils = false;

export const enableOwnerStacks = false;

// Flow magic to verify the exports of this file match the original version.
Expand Down
2 changes: 1 addition & 1 deletion scripts/rollup/bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ const bundles = [
/******* Test Utils *******/
{
moduleType: RENDERER_UTILS,
bundleTypes: [FB_WWW_DEV, NODE_DEV, NODE_PROD],
bundleTypes: [NODE_DEV, NODE_PROD],
entry: 'react-dom/test-utils',
global: 'ReactTestUtils',
minifyWithProdErrorCodes: false,
Expand Down

0 comments on commit c600b63

Please sign in to comment.