diff --git a/apps/component-generator/component-templates/ComponentTemplate/src/__tests__/ComponentName.test.tsx b/apps/component-generator/component-templates/ComponentTemplate/src/__tests__/ComponentName.test.tsx index 69a8042a24..dc5277e0e9 100644 --- a/apps/component-generator/component-templates/ComponentTemplate/src/__tests__/ComponentName.test.tsx +++ b/apps/component-generator/component-templates/ComponentTemplate/src/__tests__/ComponentName.test.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import { ComponentName } from '../ComponentName'; import * as renderer from 'react-test-renderer'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; describe('ComponentName component tests', () => { it('ComponentName default', () => { @@ -9,13 +8,5 @@ describe('ComponentName component tests', () => { expect(tree).toMatchSnapshot(); }); - it('ComponentName simple rendering does not invalidate styling', () => { - checkRenderConsistency(() => Default ComponentName, 2); - }); - - it('ComponentName re-renders correctly', () => { - checkReRender(() => Render twice, 2); - }); - // Feel free to add more tests here }); diff --git a/apps/component-generator/component-templates/ComponentTemplate/tsconfig.json b/apps/component-generator/component-templates/ComponentTemplate/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/apps/component-generator/component-templates/ComponentTemplate/tsconfig.json +++ b/apps/component-generator/component-templates/ComponentTemplate/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/change/@fluentui-react-native-916120a4-781e-45c2-a86d-988cde441aae.json b/change/@fluentui-react-native-916120a4-781e-45c2-a86d-988cde441aae.json new file mode 100644 index 0000000000..8996d7ac0f --- /dev/null +++ b/change/@fluentui-react-native-916120a4-781e-45c2-a86d-988cde441aae.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui/react-native", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-android-theme-99f469fc-18bf-4bd7-9af8-df4c6f16449d.json b/change/@fluentui-react-native-android-theme-99f469fc-18bf-4bd7-9af8-df4c6f16449d.json new file mode 100644 index 0000000000..a31ba7a972 --- /dev/null +++ b/change/@fluentui-react-native-android-theme-99f469fc-18bf-4bd7-9af8-df4c6f16449d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/android-theme", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-apple-theme-3bcb02d4-1354-491f-a47a-8b78d34dfdf5.json b/change/@fluentui-react-native-apple-theme-3bcb02d4-1354-491f-a47a-8b78d34dfdf5.json new file mode 100644 index 0000000000..04de701e34 --- /dev/null +++ b/change/@fluentui-react-native-apple-theme-3bcb02d4-1354-491f-a47a-8b78d34dfdf5.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/apple-theme", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-avatar-1c16238f-5c92-458a-a498-f15bd02a9470.json b/change/@fluentui-react-native-avatar-1c16238f-5c92-458a-a498-f15bd02a9470.json new file mode 100644 index 0000000000..402fc551ed --- /dev/null +++ b/change/@fluentui-react-native-avatar-1c16238f-5c92-458a-a498-f15bd02a9470.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/avatar", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-badge-31cc3955-e49c-4f77-83c2-60ea97607bc9.json b/change/@fluentui-react-native-badge-31cc3955-e49c-4f77-83c2-60ea97607bc9.json new file mode 100644 index 0000000000..c06977b518 --- /dev/null +++ b/change/@fluentui-react-native-badge-31cc3955-e49c-4f77-83c2-60ea97607bc9.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/badge", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-button-2ddb7ebb-ec36-4b92-8c3a-52bc8f199091.json b/change/@fluentui-react-native-button-2ddb7ebb-ec36-4b92-8c3a-52bc8f199091.json new file mode 100644 index 0000000000..e3f2d668f3 --- /dev/null +++ b/change/@fluentui-react-native-button-2ddb7ebb-ec36-4b92-8c3a-52bc8f199091.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/button", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-callout-d3144f5f-141a-4dc3-8cf2-b429c87bdc57.json b/change/@fluentui-react-native-callout-d3144f5f-141a-4dc3-8cf2-b429c87bdc57.json new file mode 100644 index 0000000000..d0ce32a131 --- /dev/null +++ b/change/@fluentui-react-native-callout-d3144f5f-141a-4dc3-8cf2-b429c87bdc57.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/callout", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-checkbox-5ea681e2-8016-4aca-95b8-533733665a9c.json b/change/@fluentui-react-native-checkbox-5ea681e2-8016-4aca-95b8-533733665a9c.json new file mode 100644 index 0000000000..99bc3f78c6 --- /dev/null +++ b/change/@fluentui-react-native-checkbox-5ea681e2-8016-4aca-95b8-533733665a9c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/checkbox", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-chip-e633c7be-60e0-4da2-b3df-9fb672f962d8.json b/change/@fluentui-react-native-chip-e633c7be-60e0-4da2-b3df-9fb672f962d8.json new file mode 100644 index 0000000000..f6d6d9fff9 --- /dev/null +++ b/change/@fluentui-react-native-chip-e633c7be-60e0-4da2-b3df-9fb672f962d8.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/chip", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-codemods-59907cfc-09f7-47e8-bddb-16f6c09eda22.json b/change/@fluentui-react-native-codemods-59907cfc-09f7-47e8-bddb-16f6c09eda22.json new file mode 100644 index 0000000000..89f2252c3d --- /dev/null +++ b/change/@fluentui-react-native-codemods-59907cfc-09f7-47e8-bddb-16f6c09eda22.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/codemods", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-composition-55672411-a1ec-4ab2-afdf-5ca969ce408e.json b/change/@fluentui-react-native-composition-55672411-a1ec-4ab2-afdf-5ca969ce408e.json new file mode 100644 index 0000000000..57db52f8c9 --- /dev/null +++ b/change/@fluentui-react-native-composition-55672411-a1ec-4ab2-afdf-5ca969ce408e.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/composition", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-contextual-menu-d0c3a1a4-a138-4354-b778-47d724e470b4.json b/change/@fluentui-react-native-contextual-menu-d0c3a1a4-a138-4354-b778-47d724e470b4.json new file mode 100644 index 0000000000..d531be37c8 --- /dev/null +++ b/change/@fluentui-react-native-contextual-menu-d0c3a1a4-a138-4354-b778-47d724e470b4.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/contextual-menu", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-default-theme-82ab598b-2ee7-4978-98be-aab1e760f5de.json b/change/@fluentui-react-native-default-theme-82ab598b-2ee7-4978-98be-aab1e760f5de.json new file mode 100644 index 0000000000..1a9a148176 --- /dev/null +++ b/change/@fluentui-react-native-default-theme-82ab598b-2ee7-4978-98be-aab1e760f5de.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/default-theme", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-divider-17bce9b6-4e99-40e9-b863-3c7af90694db.json b/change/@fluentui-react-native-divider-17bce9b6-4e99-40e9-b863-3c7af90694db.json new file mode 100644 index 0000000000..81da9b1745 --- /dev/null +++ b/change/@fluentui-react-native-divider-17bce9b6-4e99-40e9-b863-3c7af90694db.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/divider", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-drawer-57c65d46-8ac4-4bee-bb0e-9c2ce9408823.json b/change/@fluentui-react-native-drawer-57c65d46-8ac4-4bee-bb0e-9c2ce9408823.json new file mode 100644 index 0000000000..f3c6b3a63d --- /dev/null +++ b/change/@fluentui-react-native-drawer-57c65d46-8ac4-4bee-bb0e-9c2ce9408823.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/drawer", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-avatar-d7e13884-e300-4375-a786-4200a206ca38.json b/change/@fluentui-react-native-experimental-avatar-d7e13884-e300-4375-a786-4200a206ca38.json new file mode 100644 index 0000000000..27796c6253 --- /dev/null +++ b/change/@fluentui-react-native-experimental-avatar-d7e13884-e300-4375-a786-4200a206ca38.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/experimental-avatar", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-menu-button-5f530ba3-c3ec-46bd-99c6-563b5f2bb35c.json b/change/@fluentui-react-native-experimental-menu-button-5f530ba3-c3ec-46bd-99c6-563b5f2bb35c.json new file mode 100644 index 0000000000..9d6674f281 --- /dev/null +++ b/change/@fluentui-react-native-experimental-menu-button-5f530ba3-c3ec-46bd-99c6-563b5f2bb35c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/experimental-menu-button", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-shadow-a3088770-f7b4-4cd8-9c95-6f29e814d14e.json b/change/@fluentui-react-native-experimental-shadow-a3088770-f7b4-4cd8-9c95-6f29e814d14e.json new file mode 100644 index 0000000000..ef2780768b --- /dev/null +++ b/change/@fluentui-react-native-experimental-shadow-a3088770-f7b4-4cd8-9c95-6f29e814d14e.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/experimental-shadow", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-shimmer-fcaa9f08-0ec9-4804-94e5-bf81c13b3d04.json b/change/@fluentui-react-native-experimental-shimmer-fcaa9f08-0ec9-4804-94e5-bf81c13b3d04.json new file mode 100644 index 0000000000..08f9ad4f90 --- /dev/null +++ b/change/@fluentui-react-native-experimental-shimmer-fcaa9f08-0ec9-4804-94e5-bf81c13b3d04.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/experimental-shimmer", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-focus-trap-zone-8b442bb6-22b3-4046-be61-a6b548ebe858.json b/change/@fluentui-react-native-focus-trap-zone-8b442bb6-22b3-4046-be61-a6b548ebe858.json new file mode 100644 index 0000000000..ec6a5b6511 --- /dev/null +++ b/change/@fluentui-react-native-focus-trap-zone-8b442bb6-22b3-4046-be61-a6b548ebe858.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/focus-trap-zone", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-focus-zone-723a53cb-26c7-4672-aec0-dda33af82730.json b/change/@fluentui-react-native-focus-zone-723a53cb-26c7-4672-aec0-dda33af82730.json new file mode 100644 index 0000000000..705655cb87 --- /dev/null +++ b/change/@fluentui-react-native-focus-zone-723a53cb-26c7-4672-aec0-dda33af82730.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/focus-zone", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-framework-13e4f372-057e-40e6-be68-11e84d31d2a5.json b/change/@fluentui-react-native-framework-13e4f372-057e-40e6-be68-11e84d31d2a5.json new file mode 100644 index 0000000000..556a5dbabb --- /dev/null +++ b/change/@fluentui-react-native-framework-13e4f372-057e-40e6-be68-11e84d31d2a5.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/framework", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-icon-76a6c83c-c66d-4914-be33-65b6f999f9df.json b/change/@fluentui-react-native-icon-76a6c83c-c66d-4914-be33-65b6f999f9df.json new file mode 100644 index 0000000000..c8be703acf --- /dev/null +++ b/change/@fluentui-react-native-icon-76a6c83c-c66d-4914-be33-65b6f999f9df.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/icon", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-input-78cded5a-10ea-4581-9fff-8b17ea5527f7.json b/change/@fluentui-react-native-input-78cded5a-10ea-4581-9fff-8b17ea5527f7.json new file mode 100644 index 0000000000..50ca1070f4 --- /dev/null +++ b/change/@fluentui-react-native-input-78cded5a-10ea-4581-9fff-8b17ea5527f7.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/input", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-interactive-hooks-8446f968-c049-45b6-a1de-2e48917ee689.json b/change/@fluentui-react-native-interactive-hooks-8446f968-c049-45b6-a1de-2e48917ee689.json new file mode 100644 index 0000000000..997f73fee4 --- /dev/null +++ b/change/@fluentui-react-native-interactive-hooks-8446f968-c049-45b6-a1de-2e48917ee689.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/interactive-hooks", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-link-19cdb57d-64d8-47bf-a551-f6afef96f5fd.json b/change/@fluentui-react-native-link-19cdb57d-64d8-47bf-a551-f6afef96f5fd.json new file mode 100644 index 0000000000..ab827368cd --- /dev/null +++ b/change/@fluentui-react-native-link-19cdb57d-64d8-47bf-a551-f6afef96f5fd.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/link", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-menu-55a9e3fa-b5ab-4480-b1d3-348cac18d92c.json b/change/@fluentui-react-native-menu-55a9e3fa-b5ab-4480-b1d3-348cac18d92c.json new file mode 100644 index 0000000000..8f04936637 --- /dev/null +++ b/change/@fluentui-react-native-menu-55a9e3fa-b5ab-4480-b1d3-348cac18d92c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/menu", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-menu-button-3a66d5b3-563c-4f83-8be3-4bff655f6cd6.json b/change/@fluentui-react-native-menu-button-3a66d5b3-563c-4f83-8be3-4bff655f6cd6.json new file mode 100644 index 0000000000..775cc8aec1 --- /dev/null +++ b/change/@fluentui-react-native-menu-button-3a66d5b3-563c-4f83-8be3-4bff655f6cd6.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/menu-button", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-notification-e9f3be28-f879-4040-b19f-82307a7ba216.json b/change/@fluentui-react-native-notification-e9f3be28-f879-4040-b19f-82307a7ba216.json new file mode 100644 index 0000000000..08555a360b --- /dev/null +++ b/change/@fluentui-react-native-notification-e9f3be28-f879-4040-b19f-82307a7ba216.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/notification", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-overflow-bd3c5a3d-f030-429f-91dc-c5a94b26394c.json b/change/@fluentui-react-native-overflow-bd3c5a3d-f030-429f-91dc-c5a94b26394c.json new file mode 100644 index 0000000000..bad7832e30 --- /dev/null +++ b/change/@fluentui-react-native-overflow-bd3c5a3d-f030-429f-91dc-c5a94b26394c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/overflow", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-popover-5414b9d5-91aa-49f2-83c5-a29fdb5a09de.json b/change/@fluentui-react-native-popover-5414b9d5-91aa-49f2-83c5-a29fdb5a09de.json new file mode 100644 index 0000000000..c331db0474 --- /dev/null +++ b/change/@fluentui-react-native-popover-5414b9d5-91aa-49f2-83c5-a29fdb5a09de.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/popover", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-radio-group-16d1cbe4-b37c-4a38-b10f-16e8aeb1c980.json b/change/@fluentui-react-native-radio-group-16d1cbe4-b37c-4a38-b10f-16e8aeb1c980.json new file mode 100644 index 0000000000..dcb3595576 --- /dev/null +++ b/change/@fluentui-react-native-radio-group-16d1cbe4-b37c-4a38-b10f-16e8aeb1c980.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/radio-group", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-separator-0b311b01-cdfd-402b-a26c-000ecc830eda.json b/change/@fluentui-react-native-separator-0b311b01-cdfd-402b-a26c-000ecc830eda.json new file mode 100644 index 0000000000..8982c69d98 --- /dev/null +++ b/change/@fluentui-react-native-separator-0b311b01-cdfd-402b-a26c-000ecc830eda.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/separator", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-stack-4b88321f-4a97-401f-876e-cb4d82d3f4dc.json b/change/@fluentui-react-native-stack-4b88321f-4a97-401f-876e-cb4d82d3f4dc.json new file mode 100644 index 0000000000..352a4b5e35 --- /dev/null +++ b/change/@fluentui-react-native-stack-4b88321f-4a97-401f-876e-cb4d82d3f4dc.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/stack", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-switch-9807abc8-a5a9-4259-b215-fdbb018babdd.json b/change/@fluentui-react-native-switch-9807abc8-a5a9-4259-b215-fdbb018babdd.json new file mode 100644 index 0000000000..4662e66db4 --- /dev/null +++ b/change/@fluentui-react-native-switch-9807abc8-a5a9-4259-b215-fdbb018babdd.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/switch", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tablist-108eea72-1af6-429c-b131-8f826d838641.json b/change/@fluentui-react-native-tablist-108eea72-1af6-429c-b131-8f826d838641.json new file mode 100644 index 0000000000..c9384e8405 --- /dev/null +++ b/change/@fluentui-react-native-tablist-108eea72-1af6-429c-b131-8f826d838641.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/tablist", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-text-6958aa7a-ff5b-4605-ad02-f1ffd8b2b3db.json b/change/@fluentui-react-native-text-6958aa7a-ff5b-4605-ad02-f1ffd8b2b3db.json new file mode 100644 index 0000000000..e042a4625d --- /dev/null +++ b/change/@fluentui-react-native-text-6958aa7a-ff5b-4605-ad02-f1ffd8b2b3db.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/text", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-theme-a07de273-b869-4486-9208-ba530d0ee58b.json b/change/@fluentui-react-native-theme-a07de273-b869-4486-9208-ba530d0ee58b.json new file mode 100644 index 0000000000..3664e8344f --- /dev/null +++ b/change/@fluentui-react-native-theme-a07de273-b869-4486-9208-ba530d0ee58b.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/theme", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-theme-tokens-338eb6db-a9a2-4fe1-869b-4b90ca8b6d8e.json b/change/@fluentui-react-native-theme-tokens-338eb6db-a9a2-4fe1-869b-4b90ca8b6d8e.json new file mode 100644 index 0000000000..c6c849cf26 --- /dev/null +++ b/change/@fluentui-react-native-theme-tokens-338eb6db-a9a2-4fe1-869b-4b90ca8b6d8e.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/theme-tokens", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-theme-types-2cf2d964-4e18-4a41-9292-14ee36d45708.json b/change/@fluentui-react-native-theme-types-2cf2d964-4e18-4a41-9292-14ee36d45708.json new file mode 100644 index 0000000000..3029027ba8 --- /dev/null +++ b/change/@fluentui-react-native-theme-types-2cf2d964-4e18-4a41-9292-14ee36d45708.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/theme-types", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-theming-utils-b5246174-b2c5-4ec4-aa6f-d5cad0f76eed.json b/change/@fluentui-react-native-theming-utils-b5246174-b2c5-4ec4-aa6f-d5cad0f76eed.json new file mode 100644 index 0000000000..f838e55ad0 --- /dev/null +++ b/change/@fluentui-react-native-theming-utils-b5246174-b2c5-4ec4-aa6f-d5cad0f76eed.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/theming-utils", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tooltip-bde467d8-594e-400c-a4a5-19e3a875732c.json b/change/@fluentui-react-native-tooltip-bde467d8-594e-400c-a4a5-19e3a875732c.json new file mode 100644 index 0000000000..44aed13c89 --- /dev/null +++ b/change/@fluentui-react-native-tooltip-bde467d8-594e-400c-a4a5-19e3a875732c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/tooltip", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-use-slot-bd6ddc3c-c3e2-4fc6-be98-228023b83f29.json b/change/@fluentui-react-native-use-slot-bd6ddc3c-c3e2-4fc6-be98-228023b83f29.json new file mode 100644 index 0000000000..9e972f1383 --- /dev/null +++ b/change/@fluentui-react-native-use-slot-bd6ddc3c-c3e2-4fc6-be98-228023b83f29.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/use-slot", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-use-slots-8314894c-fbca-4bf3-999b-73f78a829c51.json b/change/@fluentui-react-native-use-slots-8314894c-fbca-4bf3-999b-73f78a829c51.json new file mode 100644 index 0000000000..0b9a6e86ce --- /dev/null +++ b/change/@fluentui-react-native-use-slots-8314894c-fbca-4bf3-999b-73f78a829c51.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/use-slots", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-use-styling-9e4230a0-22f1-4f69-a2bb-6a0cd1bc3c75.json b/change/@fluentui-react-native-use-styling-9e4230a0-22f1-4f69-a2bb-6a0cd1bc3c75.json new file mode 100644 index 0000000000..14d5fbff32 --- /dev/null +++ b/change/@fluentui-react-native-use-styling-9e4230a0-22f1-4f69-a2bb-6a0cd1bc3c75.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/use-styling", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-use-tokens-5a8f8dac-e41d-4c92-8810-f6c068d9625d.json b/change/@fluentui-react-native-use-tokens-5a8f8dac-e41d-4c92-8810-f6c068d9625d.json new file mode 100644 index 0000000000..d0b5eaebda --- /dev/null +++ b/change/@fluentui-react-native-use-tokens-5a8f8dac-e41d-4c92-8810-f6c068d9625d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove enzyme tests", + "packageName": "@fluentui-react-native/use-tokens", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-vibrancy-view-bcc55951-c62e-4249-b9fb-4b80f543acb6.json b/change/@fluentui-react-native-vibrancy-view-bcc55951-c62e-4249-b9fb-4b80f543acb6.json new file mode 100644 index 0000000000..538bcf19b8 --- /dev/null +++ b/change/@fluentui-react-native-vibrancy-view-bcc55951-c62e-4249-b9fb-4b80f543acb6.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/vibrancy-view", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-win32-theme-e3b32afa-0f63-42b1-8971-e4fdba9cca9d.json b/change/@fluentui-react-native-win32-theme-e3b32afa-0f63-42b1-8971-e4fdba9cca9d.json new file mode 100644 index 0000000000..04db1e0e8d --- /dev/null +++ b/change/@fluentui-react-native-win32-theme-e3b32afa-0f63-42b1-8971-e4fdba9cca9d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@fluentui-react-native/win32-theme", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@uifabricshared-theming-ramp-5b029b72-ab07-4056-b78b-2b8508b12080.json b/change/@uifabricshared-theming-ramp-5b029b72-ab07-4056-b78b-2b8508b12080.json new file mode 100644 index 0000000000..5735a6299c --- /dev/null +++ b/change/@uifabricshared-theming-ramp-5b029b72-ab07-4056-b78b-2b8508b12080.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix tsconfig for jest types", + "packageName": "@uifabricshared/theming-ramp", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/codemods/tsconfig.json b/packages/codemods/tsconfig.json index 99a55d9a79..fda9d53c1c 100644 --- a/packages/codemods/tsconfig.json +++ b/packages/codemods/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"], "exclude": ["src/transforms/__testfixtures__"] diff --git a/packages/components/Avatar/tsconfig.json b/packages/components/Avatar/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Avatar/tsconfig.json +++ b/packages/components/Avatar/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Badge/src/__tests__/Badge.test.tsx b/packages/components/Badge/src/__tests__/Badge.test.tsx index a393804b10..107bf19ebd 100644 --- a/packages/components/Badge/src/__tests__/Badge.test.tsx +++ b/packages/components/Badge/src/__tests__/Badge.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Badge, CounterBadge, PresenceBadge } from '../'; @@ -44,14 +43,6 @@ describe('Badge component tests', () => { const tree = renderer.create(Badge with shadow).toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Check checkRenderConsistency for Badge', () => { - checkRenderConsistency(() => , 2); - }); - - it('Badge re-renders correctly', () => { - checkReRender(() => , 2); - }); }); describe('PresenceBadge component tests', () => { diff --git a/packages/components/Badge/tsconfig.json b/packages/components/Badge/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Badge/tsconfig.json +++ b/packages/components/Badge/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Button/src/Button.test.tsx b/packages/components/Button/src/Button.test.tsx index 41ce61659a..5adf700072 100644 --- a/packages/components/Button/src/Button.test.tsx +++ b/packages/components/Button/src/Button.test.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import { Pressable, Text } from 'react-native'; import { Icon } from '@fluentui-react-native/icon'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Button } from './Button'; @@ -65,22 +64,4 @@ describe('Button component tests', () => { const tree = renderer.create(Composed Button with RNText).toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Button simple rendering does not invalidate styling', () => { - checkRenderConsistency(() => , 2); - }); - - it('Button re-renders correctly', () => { - checkReRender(() => , 2); - }); - - it('Button shares produced styles across multiple renders', () => { - const style = { backgroundColor: 'black' }; - checkRenderConsistency(() => , 2); - }); - - it('Button re-renders correctly with style', () => { - const style = { borderColor: 'blue' }; - checkReRender(() => , 2); - }); }); diff --git a/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx b/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx index 4b4152bbcc..3e1d122b49 100644 --- a/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx +++ b/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { CompoundButton } from './CompoundButton'; @@ -9,21 +8,3 @@ it('CompoundButton default', () => { const tree = renderer.create(Default Button).toJSON(); expect(tree).toMatchSnapshot(); }); - -it('Button simple rendering does not invalidate styling', () => { - checkRenderConsistency(() => Default button, 2); -}); - -it('Button re-renders correctly', () => { - checkReRender(() => Render twice, 2); -}); - -it('Button shares produced styles across multiple renders', () => { - const style = { backgroundColor: 'black' }; - checkRenderConsistency(() => Shared styles, 2); -}); - -it('Button re-renders correctly with style', () => { - const style = { borderColor: 'blue' }; - checkReRender(() => Shared Style Render, 2); -}); diff --git a/packages/components/Button/src/FAB/FAB.test.tsx b/packages/components/Button/src/FAB/FAB.test.tsx index 7ed158e120..29107b8b2b 100644 --- a/packages/components/Button/src/FAB/FAB.test.tsx +++ b/packages/components/Button/src/FAB/FAB.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { FAB } from './FAB'; @@ -30,38 +29,6 @@ it('Custom FAB with no shadow(iOS)', () => { expect(tree).toMatchSnapshot(); }); -it('Button simple rendering does not invalidate styling', () => { - checkRenderConsistency(() => Default FAB, 2); -}); - -it('FAB re-renders correctly', () => { - checkReRender(() => Render twice, 2); -}); - -it('FAB shares produced styles across multiple renders', () => { - const style = { backgroundColor: 'black' }; - checkRenderConsistency( - () => ( - - Shared styles - - ), - 2, - ); -}); - -it('FAB re-renders correctly with style', () => { - const style = { borderColor: 'blue' }; - checkReRender( - () => ( - - Shared Style Render - - ), - 2, - ); -}); - afterAll(() => { jest.unmock('react-native/Libraries/Utilities/Platform'); }); diff --git a/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx b/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx index 00eec21f36..91812fc1fc 100644 --- a/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx +++ b/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { ToggleButton } from './ToggleButton'; @@ -9,21 +8,3 @@ it('ToggleButton default', () => { const tree = renderer.create(Default Button).toJSON(); expect(tree).toMatchSnapshot(); }); - -it('Button simple rendering does not invalidate styling', () => { - checkRenderConsistency(() => Default button, 2); -}); - -it('Button re-renders correctly', () => { - checkReRender(() => Render twice, 2); -}); - -it('Button shares produced styles across multiple renders', () => { - const style = { backgroundColor: 'black' }; - checkRenderConsistency(() => Shared styles, 2); -}); - -it('Button re-renders correctly with style', () => { - const style = { borderColor: 'blue' }; - checkReRender(() => Shared Style Render, 2); -}); diff --git a/packages/components/Button/tsconfig.json b/packages/components/Button/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Button/tsconfig.json +++ b/packages/components/Button/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Callout/tsconfig.json b/packages/components/Callout/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Callout/tsconfig.json +++ b/packages/components/Callout/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx b/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx index bdee3305f2..2c1b5cf403 100644 --- a/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx +++ b/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx @@ -1,9 +1,7 @@ import * as React from 'react'; -import type { AccessibilityActionName } from 'react-native'; import { Text, View } from 'react-native'; import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import { Svg } from 'react-native-svg'; import * as renderer from 'react-test-renderer'; @@ -80,27 +78,4 @@ describe('Checkbox component tests', () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Checkbox simple rendering does not invalidate styling', () => { - checkRenderConsistency(() => Default button, 2); - }); - - it('Checkbox re-renders correctly', () => { - checkReRender(() => Render twice, 2); - }); - - it('Checkbox shares produced styles across multiple renders', () => { - const style = { backgroundColor: 'black' }; - checkRenderConsistency(() => Shared styles, 2); - }); - - it('Checkbox re-renders correctly with style', () => { - const style = { borderColor: 'blue' }; - checkReRender(() => Shared Style Render, 2); - }); - - it('Checkbox re-renders correctly with accessibilityAction', () => { - const action = [{ name: 'Expand' as AccessibilityActionName }]; - checkReRender(() => Shared Style Render, 2); - }); }); diff --git a/packages/components/Checkbox/tsconfig.json b/packages/components/Checkbox/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Checkbox/tsconfig.json +++ b/packages/components/Checkbox/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Chip/src/__tests__/Chip.test.tsx b/packages/components/Chip/src/__tests__/Chip.test.tsx index b7ba67a667..88364d7be6 100644 --- a/packages/components/Chip/src/__tests__/Chip.test.tsx +++ b/packages/components/Chip/src/__tests__/Chip.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Chip } from '../'; @@ -30,12 +29,4 @@ describe('Chip component tests', () => { const tree = renderer.create(Chip Tokens).toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Check checkRenderConsistency for Chip', () => { - checkRenderConsistency(() => , 2); - }); - - it('Chip re-renders correctly', () => { - checkReRender(() => , 2); - }); }); diff --git a/packages/components/Chip/tsconfig.json b/packages/components/Chip/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Chip/tsconfig.json +++ b/packages/components/Chip/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/ContextualMenu/tsconfig.json b/packages/components/ContextualMenu/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/ContextualMenu/tsconfig.json +++ b/packages/components/ContextualMenu/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Divider/src/__tests__/Divider.test.tsx b/packages/components/Divider/src/__tests__/Divider.test.tsx index b964801024..f8fab53302 100644 --- a/packages/components/Divider/src/__tests__/Divider.test.tsx +++ b/packages/components/Divider/src/__tests__/Divider.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Divider } from '../Divider'; @@ -95,8 +94,4 @@ describe('Divider component tests', () => { const tree = renderer.create(Hello).toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Divider re-renders correctly', () => { - checkReRender(() => , 2); - }); }); diff --git a/packages/components/Divider/tsconfig.json b/packages/components/Divider/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Divider/tsconfig.json +++ b/packages/components/Divider/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/FocusTrapZone/tsconfig.json b/packages/components/FocusTrapZone/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/FocusTrapZone/tsconfig.json +++ b/packages/components/FocusTrapZone/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/FocusZone/tsconfig.json b/packages/components/FocusZone/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/FocusZone/tsconfig.json +++ b/packages/components/FocusZone/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Icon/src/__tests__/Icon.test.tsx b/packages/components/Icon/src/__tests__/Icon.test.tsx index afbbfb3fae..e488ad1017 100644 --- a/packages/components/Icon/src/__tests__/Icon.test.tsx +++ b/packages/components/Icon/src/__tests__/Icon.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import { Path, Svg } from 'react-native-svg'; import * as renderer from 'react-test-renderer'; @@ -45,12 +44,4 @@ describe('Icon component tests', () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Icon checkRenderConsistency', () => { - checkRenderConsistency(() => , 2); - }); - - it('Icon re-renders correctly', () => { - checkReRender(() => , 2); - }); }); diff --git a/packages/components/Icon/tsconfig.json b/packages/components/Icon/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Icon/tsconfig.json +++ b/packages/components/Icon/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Input/src/__tests__/Input.test.tsx b/packages/components/Input/src/__tests__/Input.test.tsx index 5a5292c9f3..92701e6ca2 100644 --- a/packages/components/Input/src/__tests__/Input.test.tsx +++ b/packages/components/Input/src/__tests__/Input.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Input } from '../Input'; @@ -42,16 +41,4 @@ describe('Input component tests', () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Input simple rendering does not invalidate styling', () => { - checkRenderConsistency(() => , 2); - }); - - it('Input re-renders correctly', () => { - checkReRender(() => , 2); - }); - - it('Input with placeholder', () => { - checkReRender(() => , 2); - }); }); diff --git a/packages/components/Input/tsconfig.json b/packages/components/Input/tsconfig.json index eb0b9c6f01..98539028fb 100644 --- a/packages/components/Input/tsconfig.json +++ b/packages/components/Input/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src", "svgs.d.ts"] } diff --git a/packages/components/Link/src/__tests__/Link.test.tsx b/packages/components/Link/src/__tests__/Link.test.tsx index e18d210860..509dca3ab6 100644 --- a/packages/components/Link/src/__tests__/Link.test.tsx +++ b/packages/components/Link/src/__tests__/Link.test.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import { Alert } from 'react-native'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Link } from '../Link'; @@ -41,36 +40,4 @@ describe('Link component tests', () => { .toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Link simple rendering does not invalidate styling', () => { - checkRenderConsistency(() => Link to Bing, 2); - }); - - it('Link re-renders correctly', () => { - checkReRender(() => Render twice, 2); - }); - - it('Link shares produced styles across multiple renders', () => { - const style = { color: 'black' }; - checkRenderConsistency( - () => ( - - Shared styles - - ), - 2, - ); - }); - - it('Link re-renders correctly with style', () => { - const style = { color: 'black' }; - checkReRender( - () => ( - - Shared Style Render - - ), - 2, - ); - }); }); diff --git a/packages/components/Link/tsconfig.json b/packages/components/Link/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/components/Link/tsconfig.json +++ b/packages/components/Link/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Menu/src/__tests__/Menu.test.tsx b/packages/components/Menu/src/__tests__/Menu.test.tsx index e81a55e7c2..7fc6cce6eb 100644 --- a/packages/components/Menu/src/__tests__/Menu.test.tsx +++ b/packages/components/Menu/src/__tests__/Menu.test.tsx @@ -1,8 +1,6 @@ import * as React from 'react'; -import type { AccessibilityActionName } from 'react-native'; import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import { checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Menu } from '../Menu/Menu'; @@ -234,61 +232,3 @@ it('Menu open menu group and menu header', () => { .toJSON(); expect(tree).toMatchSnapshot(); }); - -describe('Menu rerender tests', () => { - it('Menu re-renders correctly', () => { - checkReRender( - () => ( - - - - - - - Option 1 - - - - ), - 3, - ); - }); - - it('Menu re-renders correctly with style', () => { - const style = { backgroundColor: 'black' }; - checkReRender( - () => ( - - - - - - - Option 1 - - - - ), - 3, - ); - }); - - it('Menu re-renders correctly with accessibilityAction', () => { - const action = [{ name: 'Expand' as AccessibilityActionName }]; - checkReRender( - () => ( - - - - - - - Option 1 - - - - ), - 3, - ); - }); -}); diff --git a/packages/components/Menu/tsconfig.json b/packages/components/Menu/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/components/Menu/tsconfig.json +++ b/packages/components/Menu/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/MenuButton/tsconfig.json b/packages/components/MenuButton/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/MenuButton/tsconfig.json +++ b/packages/components/MenuButton/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Notification/src/__tests__/Notification.test.tsx b/packages/components/Notification/src/__tests__/Notification.test.tsx index bbe4b66b1e..b6c1d40053 100644 --- a/packages/components/Notification/src/__tests__/Notification.test.tsx +++ b/packages/components/Notification/src/__tests__/Notification.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Notification } from '../Notification'; @@ -31,44 +30,4 @@ describe('Notification component tests', () => { .toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Notification simple rendering does not invalidate styling', () => { - checkRenderConsistency( - () => ( - { - console.log('Notification tapped'); - }} - onActionPress={() => { - console.log('Undo tapped'); - }} - > - Mail Archived - - ), - 2, - ); - }); - - it('Notification re-renders correctly', () => { - checkReRender( - () => ( - { - console.log('Notification tapped'); - }} - onActionPress={() => { - console.log('Undo tapped'); - }} - > - Mail Archived - - ), - 2, - ); - }); }); diff --git a/packages/components/Notification/tsconfig.json b/packages/components/Notification/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Notification/tsconfig.json +++ b/packages/components/Notification/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx b/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx index d4c6632cb8..b7f874fd08 100644 --- a/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx +++ b/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { /* checkRenderConsistency,*/ checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Radio } from '../Radio'; @@ -15,13 +14,4 @@ describe('Radio component tests', () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); - - /* Commenting this test out until memoization of keyDownEvents prop issue is fixed. */ - // it('Radio simple rendering does not invalidate styling', () => { - // checkRenderConsistency(() => , 2); - // }); - - it('Radio re-renders correctly', () => { - checkReRender(() => , 2); - }); }); diff --git a/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx b/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx index 42eb483fcc..a511530af4 100644 --- a/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx +++ b/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Radio } from '../../Radio/Radio'; @@ -86,14 +85,4 @@ describe('RadioGroup component tests', () => { expect(tree).toMatchSnapshot(); await renderer.act(async () => null); }); - - it('RadioGroup simple rendering does not invalidate styling', async () => { - checkRenderConsistency(() => Default RadioGroup, 2); - await renderer.act(async () => null); - }); - - it('RadioGroup re-renders correctly', async () => { - checkReRender(() => Render twice, 2); - await renderer.act(async () => null); - }); }); diff --git a/packages/components/RadioGroup/tsconfig.json b/packages/components/RadioGroup/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/components/RadioGroup/tsconfig.json +++ b/packages/components/RadioGroup/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Separator/tsconfig.json b/packages/components/Separator/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Separator/tsconfig.json +++ b/packages/components/Separator/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Stack/tsconfig.json b/packages/components/Stack/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Stack/tsconfig.json +++ b/packages/components/Stack/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Switch/src/__tests__/Switch.test.tsx b/packages/components/Switch/src/__tests__/Switch.test.tsx index 4dae0c071f..b8f43b9012 100644 --- a/packages/components/Switch/src/__tests__/Switch.test.tsx +++ b/packages/components/Switch/src/__tests__/Switch.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Switch } from '../Switch'; @@ -17,7 +16,3 @@ it('Switch Disabled', () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); - -it('Switch re-renders correctly', () => { - checkReRender(() => , 2); -}); diff --git a/packages/components/Switch/tsconfig.json b/packages/components/Switch/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Switch/tsconfig.json +++ b/packages/components/Switch/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx b/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx index 516fcde0dc..b99d4aa52f 100644 --- a/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx +++ b/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import Tab from '../Tab'; @@ -69,15 +68,4 @@ describe('Tab component tests', () => { const tree = renderer.create(Tab 1); expect(tree).toMatchSnapshot(); }); - - it('Tab re-renders correctly', () => { - checkReRender( - () => ( - - Tab 1 - - ), - 2, - ); - }); }); diff --git a/packages/components/TabList/tsconfig.json b/packages/components/TabList/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/components/TabList/tsconfig.json +++ b/packages/components/TabList/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/components/Text/src/__tests__/Text.test.tsx b/packages/components/Text/src/__tests__/Text.test.tsx index dfc91cc305..54189475dc 100644 --- a/packages/components/Text/src/__tests__/Text.test.tsx +++ b/packages/components/Text/src/__tests__/Text.test.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Text } from '../Text'; @@ -26,36 +25,6 @@ describe('Text component tests', () => { expect(tree).toMatchSnapshot(); }); - it('Text simple rendering does not invalidate styling', () => { - checkRenderConsistency(() => Default); - checkRenderConsistency(() => Default); - }); - - it('Text re-renders correctly', () => { - checkReRender(() => Default); - checkReRender(() => Default); - }); - - it('Text shares produced styles across multiple renders', () => { - const style = { color: 'black' }; - checkRenderConsistency(() => Default); - checkRenderConsistency(() => ( - - Default - - )); - }); - - it('Text re-renders correctly with style', () => { - const style = { color: 'blue' }; - checkReRender(() => Default); - checkReRender(() => ( - - Default - - )); - }); - it('Text variants render correctly with style', () => { const style = { marginBottom: 8, diff --git a/packages/components/Text/tsconfig.json b/packages/components/Text/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/components/Text/tsconfig.json +++ b/packages/components/Text/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/deprecated/theming-ramp/tsconfig.json b/packages/deprecated/theming-ramp/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/deprecated/theming-ramp/tsconfig.json +++ b/packages/deprecated/theming-ramp/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/experimental/Avatar/tsconfig.json b/packages/experimental/Avatar/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/experimental/Avatar/tsconfig.json +++ b/packages/experimental/Avatar/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/experimental/Drawer/tsconfig.json b/packages/experimental/Drawer/tsconfig.json index eb0b9c6f01..98539028fb 100644 --- a/packages/experimental/Drawer/tsconfig.json +++ b/packages/experimental/Drawer/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src", "svgs.d.ts"] } diff --git a/packages/experimental/MenuButton/tsconfig.json b/packages/experimental/MenuButton/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/experimental/MenuButton/tsconfig.json +++ b/packages/experimental/MenuButton/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx b/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx index d9ea9ebb4c..cc7cdf8d5a 100644 --- a/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx +++ b/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import { ButtonV1 } from '@fluentui-react-native/button'; import { Menu, MenuPopover, MenuTrigger, MenuItem } from '@fluentui-react-native/menu'; -import { checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Overflow, OverflowItem, useOverflowMenu } from '../'; @@ -45,22 +44,4 @@ describe('Overflow component tests', () => { .toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Overflow re-renders correctly', () => { - checkReRender( - () => ( - - {items.map((item) => ( - - {item} - - ))} - - - ), - 2, - ); - }); - - // Feel free to add more tests here }); diff --git a/packages/experimental/Overflow/tsconfig.json b/packages/experimental/Overflow/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/experimental/Overflow/tsconfig.json +++ b/packages/experimental/Overflow/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/experimental/Popover/tsconfig.json b/packages/experimental/Popover/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/experimental/Popover/tsconfig.json +++ b/packages/experimental/Popover/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/experimental/Shadow/src/__tests__/Shadow.test.tsx b/packages/experimental/Shadow/src/__tests__/Shadow.test.tsx index 4585a980b3..dec04e15ba 100644 --- a/packages/experimental/Shadow/src/__tests__/Shadow.test.tsx +++ b/packages/experimental/Shadow/src/__tests__/Shadow.test.tsx @@ -3,7 +3,6 @@ import { Text, View } from 'react-native'; import { mergeStyles, useFluentTheme } from '@fluentui-react-native/framework'; import { Pressable } from '@fluentui-react-native/pressable'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Shadow } from '../Shadow'; @@ -142,14 +141,6 @@ describe('Shadow component tests', () => { expect(tree).toMatchSnapshot(); }); - it('Shadow simple rendering does not invalidate styling', () => { - checkRenderConsistency(() => , 2); - }); - - it('Shadow re-renders correctly', () => { - checkReRender(() => , 2); - }); - afterAll(() => { jest.unmock('react-native/Libraries/Utilities/Platform'); }); diff --git a/packages/experimental/Shadow/tsconfig.json b/packages/experimental/Shadow/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/experimental/Shadow/tsconfig.json +++ b/packages/experimental/Shadow/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/experimental/Shimmer/tsconfig.json b/packages/experimental/Shimmer/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/experimental/Shimmer/tsconfig.json +++ b/packages/experimental/Shimmer/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/experimental/Stack/tsconfig.json b/packages/experimental/Stack/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/experimental/Stack/tsconfig.json +++ b/packages/experimental/Stack/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx b/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx index 37a908028c..70e5e963e4 100644 --- a/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx +++ b/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import { ButtonV1 } from '@fluentui-react-native/button'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { Tooltip } from '../Tooltip'; @@ -17,28 +16,4 @@ describe('Tooltip component tests', () => { .toJSON(); expect(tree).toMatchSnapshot(); }); - - it('Tooltip simple rendering does not invalidate styling', () => { - checkRenderConsistency( - () => ( - - Default Tooltip - - ), - 2, - ); - }); - - it('Tooltip re-renders correctly', () => { - checkReRender( - () => ( - - Render twice - - ), - 2, - ); - }); - - // Feel free to add more tests here }); diff --git a/packages/experimental/Tooltip/tsconfig.json b/packages/experimental/Tooltip/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/experimental/Tooltip/tsconfig.json +++ b/packages/experimental/Tooltip/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/experimental/VibrancyView/tsconfig.json b/packages/experimental/VibrancyView/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/experimental/VibrancyView/tsconfig.json +++ b/packages/experimental/VibrancyView/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/framework/composition/tsconfig.json b/packages/framework/composition/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/framework/composition/tsconfig.json +++ b/packages/framework/composition/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/framework/framework/src/__snapshots__/compressible.test.tsx.snap b/packages/framework/framework/src/__snapshots__/compressible.test.tsx.snap index 3cc7b512b1..30114d68e5 100644 --- a/packages/framework/framework/src/__snapshots__/compressible.test.tsx.snap +++ b/packages/framework/framework/src/__snapshots__/compressible.test.tsx.snap @@ -3,192 +3,92 @@ exports[`compressible tests Two labels, one plugging in SuperHeader instead 1`] = ` - - - - - - Super Header - - - - - Normal caption - - - - - - + - - - - - Normal Header - - - - - Another normal caption - - - - - + Normal caption + + + + + Normal Header + + + Another normal caption + `; exports[`compressible tests Two labels, one with caption and one without 1`] = ` + + Header1 + - - + - - Header1 - - - - - - - - - Header2 - - - - - Caption2 - - - - - + Caption2 + `; diff --git a/packages/framework/framework/src/compressible.test.tsx b/packages/framework/framework/src/compressible.test.tsx index 7cbef934fd..f6a8cf9f91 100644 --- a/packages/framework/framework/src/compressible.test.tsx +++ b/packages/framework/framework/src/compressible.test.tsx @@ -8,8 +8,7 @@ import { mergeStyles } from '@fluentui-react-native/merge-props'; import type { Theme } from '@fluentui-react-native/theme-types'; import { useSlot, withSlots } from '@fluentui-react-native/use-slot'; import { applyTokenLayers } from '@fluentui-react-native/use-tokens'; -import { mount } from 'enzyme'; -import toJson from 'enzyme-to-json'; +import * as renderer from 'react-test-renderer'; import { compressible } from './compressible'; import { buildUseTokens } from './useTokens'; @@ -103,32 +102,28 @@ const Label = compressible((props: LabelProps, useToken }; }, useLabelTokens); -/** - * this wrapper solves the (so-far) inexplicable type errors from the matchers in typescript - */ -function snapshotTestTree(tree: any) { - (expect(toJson(tree)) as any).toMatchSnapshot(); -} - describe('compressible tests', () => { - /** first render the component with no updates */ it('Two labels, one with caption and one without', () => { - const tree = mount( - - , - ); - snapshotTestTree(tree); + const tree = renderer + .create( + + , + ) + .toJSON(); + expect(tree).toMatchSnapshot(); }); it('Two labels, one plugging in SuperHeader instead', () => { - const tree = mount( - - , - ); - snapshotTestTree(tree); + const tree = renderer + .create( + + , + ) + .toJSON(); + expect(tree).toMatchSnapshot(); }); }); diff --git a/packages/framework/framework/tsconfig.json b/packages/framework/framework/tsconfig.json index e6530c0a20..127f1c197a 100644 --- a/packages/framework/framework/tsconfig.json +++ b/packages/framework/framework/tsconfig.json @@ -1,10 +1,10 @@ { + "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { + "outDir": "lib", + "resolveJsonModule": true, "baseUrl": ".", "target": "es5", - "jsx": "react", - "outDir": "lib", - "declaration": true, "sourceMap": true, "experimentalDecorators": true, "importHelpers": true, @@ -16,8 +16,7 @@ "noUnusedLocals": true, "strict": true, "suppressImplicitAnyIndexErrors": true, - "lib": ["es6"], - "types": ["node", "jest"] + "lib": ["es6"] }, "include": ["src"] } diff --git a/packages/framework/theme/tsconfig.json b/packages/framework/theme/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/framework/theme/tsconfig.json +++ b/packages/framework/theme/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/framework/use-slot/src/__snapshots__/useSlot.test.tsx.snap b/packages/framework/use-slot/src/__snapshots__/useSlot.test.tsx.snap index 335ae027af..d5b401d6f9 100644 --- a/packages/framework/use-slot/src/__snapshots__/useSlot.test.tsx.snap +++ b/packages/framework/use-slot/src/__snapshots__/useSlot.test.tsx.snap @@ -2,140 +2,70 @@ exports[`useSlot tests Header and caption text render as expected 1`] = ` - - - - - Header text - - - - - - - Caption text - - - - - -`; - -exports[`useSlot tests Multi-level text elements are equivalent 1`] = ` - - - HeaderCaptionText - + Header text - -`; - -exports[`useSlot tests Multi-level text elements are equivalent 2`] = ` - - - HeaderCaptionText - + Caption text - + +`; + +exports[`useSlot tests Multi-level text elements are equivalent 1`] = ` + + HeaderCaptionText + +`; + +exports[`useSlot tests Multi-level text elements are equivalent 2`] = ` + + HeaderCaptionText + `; exports[`useSlot tests Two base text elements rendering, with and without styles 1`] = ` - - - - - No Style - - - - + No Style + + - - - With Style - - - - + } + > + With Style + `; diff --git a/packages/framework/use-slot/src/useSlot.test.tsx b/packages/framework/use-slot/src/useSlot.test.tsx index 6a4f914fa7..012d430bc2 100644 --- a/packages/framework/use-slot/src/useSlot.test.tsx +++ b/packages/framework/use-slot/src/useSlot.test.tsx @@ -5,8 +5,7 @@ import type { TextProps } from 'react-native'; import { Text, View } from 'react-native'; import { mergeStyles } from '@fluentui-react-native/merge-props'; -import { mount } from 'enzyme'; -import toJson from 'enzyme-to-json'; +import * as renderer from 'react-test-renderer'; import type { NativeReactType } from './renderSlot'; import { stagedComponent } from './stagedComponent'; @@ -77,43 +76,40 @@ const HeaderCaptionText1 = (props: React.PropsWithChildren) => { // Control authored by plugging the root const HeaderCaptionText2 = (props: React.PropsWithChildren) => HeaderText({ ...props, inner: CaptionText }); -/** - * this wrapper solves the (so-far) inexplicable type errors from the matchers in typescript - */ -function snapshotTestTree(tree: any) { - (expect(toJson(tree)) as any).toMatchSnapshot(); -} - // some styles to use in tests const styleWithColor: TextProps['style'] = { color: 'blue' }; describe('useSlot tests', () => { /** first render the component with no updates */ it('Two base text elements rendering, with and without styles', () => { - const tree = mount( - - No Style - With Style - , - ); - snapshotTestTree(tree); + const tree = renderer + .create( + + No Style + With Style + , + ) + .toJSON(); + expect(tree).toMatchSnapshot(); }); it('Header and caption text render as expected', () => { - const tree = mount( - - Header text - Caption text - , - ); - snapshotTestTree(tree); + const tree = renderer + .create( + + Header text + Caption text + , + ) + .toJSON(); + expect(tree).toMatchSnapshot(); }); it('Multi-level text elements are equivalent', () => { - const tree1 = mount(HeaderCaptionText); - snapshotTestTree(tree1); - const tree2 = mount(HeaderCaptionText); - snapshotTestTree(tree2); - expect(toJson(tree1['HeaderCaptionText1'])).toEqual(toJson(tree2['HeaderCaptionText2'])); + const tree1 = renderer.create(HeaderCaptionText).toJSON(); + expect(tree1).toMatchSnapshot(); + const tree2 = renderer.create(HeaderCaptionText).toJSON(); + expect(tree2).toMatchSnapshot(); + expect(tree1['HeaderCaptionText1']).toEqual(tree2['HeaderCaptionText2']); }); }); diff --git a/packages/framework/use-slot/tsconfig.json b/packages/framework/use-slot/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/framework/use-slot/tsconfig.json +++ b/packages/framework/use-slot/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/framework/use-slots/src/__snapshots__/useSlots.samples.test.tsx.snap b/packages/framework/use-slots/src/__snapshots__/useSlots.samples.test.tsx.snap index 1652a01725..19df4c49d9 100644 --- a/packages/framework/use-slots/src/__snapshots__/useSlots.samples.test.tsx.snap +++ b/packages/framework/use-slots/src/__snapshots__/useSlots.samples.test.tsx.snap @@ -2,94 +2,53 @@ exports[`useSlots sample code test suite renders sample 1 - the two types of basic bold text components 1`] = `
- - - Staged component at one level - - - + - - Standard component of a single level - - + Standard component of a single level +
`; exports[`useSlots sample code test suite renders sample 2 = the two types of two level header components 1`] = `
- - - Staged component with two levels - - - + - - - Standard component with two levels - - - + Standard component with two levels +
`; @@ -98,298 +57,183 @@ exports[`useSlots sample code test suite renders sample 3 - the two types of hig --- SIMPLE USAGE COMPARISON --- - -
- - - - Standard HOC - - - -
-
- + +
-
- - Staged HOC - -
- + Staged HOC + +
--- COMPARISON WITH CAPTIONS --- - -
+ Standard HOC with Caption + + - - - - Standard HOC with Caption - - - - - - Caption text - - -
-
- + +
-
- - Staged HOC with Caption - - + - Caption text - -
- + } + > + Caption text + +
--- COMPARISON WITH CAPTIONS AND CUSTOMIZATIONS --- - -
- - - - Standard HOC with caption and customizations - - - - + - - Caption text - - -
-
- + Caption text + + +
-
- - Staged HOC with caption and customizations - - + - Caption text - -
- + } + > + Caption text + +
`; diff --git a/packages/framework/use-slots/src/useSlots.samples.test.tsx b/packages/framework/use-slots/src/useSlots.samples.test.tsx index 9f5f8f4f63..77434ade47 100644 --- a/packages/framework/use-slots/src/useSlots.samples.test.tsx +++ b/packages/framework/use-slots/src/useSlots.samples.test.tsx @@ -4,8 +4,7 @@ import type { CSSProperties } from 'react'; import { mergeProps } from '@fluentui-react-native/merge-props'; import { withSlots, stagedComponent } from '@fluentui-react-native/use-slot'; -import { mount } from 'enzyme'; -import toJson from 'enzyme-to-json'; +import * as renderer from 'react-test-renderer'; import { buildUseSlots } from './buildUseSlots'; @@ -73,23 +72,21 @@ describe('useSlots sample code test suite', () => { }); BoldTextStaged.displayName = 'BoldTextStaged'; - /** - * The demos of the code use enzyme with JSDom to show the full tree. This has the side effect of doubling up primitive elements in the output - * JSON. This is an issue with rendering react-native with enzyme but in real usage the nodes only render once. - */ it('renders sample 1 - the two types of basic bold text components', () => { const styleToMerge: TextStyle = { color: 'black' }; /** * First render the staged component. This invokes the wrapper that was built by the stagedComponent function */ - const wrapper = mount( -
- Staged component at one level - Standard component of a single level -
, - ); - expect(toJson(wrapper)).toMatchSnapshot(); + const wrapper = renderer + .create( +
+ Staged component at one level + Standard component of a single level +
, + ) + .toJSON(); + expect(wrapper).toMatchSnapshot(); }); /** @@ -159,13 +156,15 @@ describe('useSlots sample code test suite', () => { /** * First render the staged component. This invokes the wrapper that was built by the stagedComponent function */ - const wrapper = mount( -
- Staged component with two levels - Standard component with two levels -
, - ); - expect(toJson(wrapper)).toMatchSnapshot(); + const wrapper = renderer + .create( +
+ Staged component with two levels + Standard component with two levels +
, + ) + .toJSON(); + expect(wrapper).toMatchSnapshot(); }); /** @@ -250,9 +249,6 @@ describe('useSlots sample code test suite', () => { }); CaptionedHeaderStaged.displayName = 'CaptionedHeaderStaged'; - /** - * Render to enzyme snapshots - */ it('renders sample 3 - the two types of higher order header components', () => { const styleToMerge: ViewStyle = { backgroundColor: 'gray', borderColor: 'purple', borderWidth: 1 }; @@ -260,27 +256,29 @@ describe('useSlots sample code test suite', () => { * Render the two sets of components. Note in the snapshots how the render tree layers for the standard approach are starting * to add up. */ - const wrapper = mount( -
- --- SIMPLE USAGE COMPARISON --- - Standard HOC - Staged HOC - --- COMPARISON WITH CAPTIONS --- - - Standard HOC with Caption - - - Staged HOC with Caption - - --- COMPARISON WITH CAPTIONS AND CUSTOMIZATIONS --- - - Standard HOC with caption and customizations - - - Staged HOC with caption and customizations - -
, - ); - expect(toJson(wrapper)).toMatchSnapshot(); + const wrapper = renderer + .create( +
+ --- SIMPLE USAGE COMPARISON --- + Standard HOC + Staged HOC + --- COMPARISON WITH CAPTIONS --- + + Standard HOC with Caption + + + Staged HOC with Caption + + --- COMPARISON WITH CAPTIONS AND CUSTOMIZATIONS --- + + Standard HOC with caption and customizations + + + Staged HOC with caption and customizations + +
, + ) + .toJSON(); + expect(wrapper).toMatchSnapshot(); }); }); diff --git a/packages/framework/use-slots/tsconfig.json b/packages/framework/use-slots/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/framework/use-slots/tsconfig.json +++ b/packages/framework/use-slots/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/framework/use-styling/src/__snapshots__/useStyling.samples.test.tsx.snap b/packages/framework/use-styling/src/__snapshots__/useStyling.samples.test.tsx.snap index f71cd5970b..e672727631 100644 --- a/packages/framework/use-styling/src/__snapshots__/useStyling.samples.test.tsx.snap +++ b/packages/framework/use-styling/src/__snapshots__/useStyling.samples.test.tsx.snap @@ -1,7 +1,35 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`useStyling samples Sample1Text rendering with no overrides 1`] = ` - + + Sample1a + +`; + +exports[`useStyling samples Sample1Text rendering with some custom settings in the theme 1`] = ` + + Sample1b + +`; + +exports[`useStyling samples Sample2Text rendering with defaults and a color override 1`] = ` + - - Sample1a - + Sample2 with defaults - -`; - -exports[`useStyling samples Sample1Text rendering with some custom settings in the theme 1`] = ` - - - Sample1b - + Sample2 with color override via prop - -`; - -exports[`useStyling samples Sample2Text rendering with defaults and a color override 1`] = ` - - - - - - Sample2 with defaults - - - - - - - Sample2 with color override via prop - - - - `; exports[`useStyling samples Sample2Text rendering with some custom settings in the theme 1`] = ` - - - - - Sample2 with theme overrides set - - - - - - - Sample2 with theme and color prop override - - - - + + Sample2 with theme overrides set + + + Sample2 with theme and color prop override + `; diff --git a/packages/framework/use-styling/src/useStyling.samples.test.tsx b/packages/framework/use-styling/src/useStyling.samples.test.tsx index 1921a62a00..a38ef4c65a 100644 --- a/packages/framework/use-styling/src/useStyling.samples.test.tsx +++ b/packages/framework/use-styling/src/useStyling.samples.test.tsx @@ -2,8 +2,7 @@ import * as React from 'react'; import type { TextProps, ColorValue } from 'react-native'; import { Text, View } from 'react-native'; -import { mount } from 'enzyme'; -import toJson from 'enzyme-to-json'; +import * as renderer from 'react-test-renderer'; import { buildProps } from './buildProps'; import type { ThemeHelper, UseStylingOptions } from './buildUseStyling'; @@ -46,13 +45,6 @@ const baseTheme: Theme = { const current = { theme: baseTheme }; -/** - * this wrapper solves the (so-far) inexplicable type errors from the matchers in typescript - */ -function snapshotTestTree(tree: any) { - (expect(toJson(tree)) as any).toMatchSnapshot(); -} - /** * Because the buildUseStyling utility is not opinionated about theming, the theming is injected via * a theme helper implementation. This allows for a framework to build an opinionated version with @@ -137,8 +129,8 @@ describe('useStyling samples', () => { /** first render the component with no updates */ it('Sample1Text rendering with no overrides', () => { - const tree = mount(Sample1a); - snapshotTestTree(tree); + const tree = renderer.create(Sample1a).toJSON(); + expect(tree).toMatchSnapshot(); }); /** now re-theme the component via the components in the theme */ @@ -151,8 +143,8 @@ describe('useStyling samples', () => { }, }, }); - const tree = mount(Sample1b); - snapshotTestTree(tree); + const tree = renderer.create(Sample1b).toJSON(); + expect(tree).toMatchSnapshot(); }); /** @@ -218,13 +210,15 @@ describe('useStyling samples', () => { /** rendering the Sample2 component with the base theme */ it('Sample2Text rendering with defaults and a color override', () => { themeHelper.setActive(); - const tree = mount( - - Sample2 with defaults - Sample2 with color override via prop - , - ); - snapshotTestTree(tree); + const tree = renderer + .create( + + Sample2 with defaults + Sample2 with color override via prop + , + ) + .toJSON(); + expect(tree).toMatchSnapshot(); }); /** now re-theme the component via the components in the theme */ @@ -241,12 +235,14 @@ describe('useStyling samples', () => { }, }, }); - const tree = mount( - - Sample2 with theme overrides set - Sample2 with theme and color prop override - , - ); - snapshotTestTree(tree); + const tree = renderer + .create( + + Sample2 with theme overrides set + Sample2 with theme and color prop override + , + ) + .toJSON(); + expect(tree).toMatchSnapshot(); }); }); diff --git a/packages/framework/use-tokens/src/__snapshots__/useTokens.samples.test.tsx.snap b/packages/framework/use-tokens/src/__snapshots__/useTokens.samples.test.tsx.snap index c0f0fa1712..64eb6e26e4 100644 --- a/packages/framework/use-tokens/src/__snapshots__/useTokens.samples.test.tsx.snap +++ b/packages/framework/use-tokens/src/__snapshots__/useTokens.samples.test.tsx.snap @@ -1,7 +1,35 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`useTokens samples Sample1Text rendering with no overrides 1`] = ` - + + Sample1a + +`; + +exports[`useTokens samples Sample1Text rendering with some custom settings in the theme 1`] = ` + + Sample1b + +`; + +exports[`useTokens samples Sample2Text rendering with defaults and a color override 1`] = ` + - - Sample1a - + Sample2 with defaults - -`; - -exports[`useTokens samples Sample1Text rendering with some custom settings in the theme 1`] = ` - - - Sample1b - + Sample2 with color override via prop - -`; - -exports[`useTokens samples Sample2Text rendering with defaults and a color override 1`] = ` - - - - - - Sample2 with defaults - - - - - - - Sample2 with color override via prop - - - - `; exports[`useTokens samples Sample2Text rendering with some custom settings in the theme 1`] = ` - - - - - Sample2 with theme overrides set - - - - - - - Sample2 with theme and color prop override - - - - + + Sample2 with theme overrides set + + + Sample2 with theme and color prop override + `; diff --git a/packages/framework/use-tokens/src/useTokens.samples.test.tsx b/packages/framework/use-tokens/src/useTokens.samples.test.tsx index db2b44e267..215f9ef7f5 100644 --- a/packages/framework/use-tokens/src/useTokens.samples.test.tsx +++ b/packages/framework/use-tokens/src/useTokens.samples.test.tsx @@ -4,8 +4,7 @@ import { Text, View } from 'react-native'; import { immutableMerge } from '@fluentui-react-native/immutable-merge'; import { mergeStyles } from '@fluentui-react-native/merge-props'; -import { mount } from 'enzyme'; -import toJson from 'enzyme-to-json'; +import * as renderer from 'react-test-renderer'; import { buildUseTokens } from './buildUseTokens'; @@ -52,13 +51,6 @@ const setActiveTheme = (theme?: Partial) => { current.theme = (theme && immutableMerge(baseTheme, theme as Theme)) || baseTheme; }; -/** - * this wrapper solves the (so-far) inexplicable type errors from the matchers in typescript - */ -function snapshotTestTree(tree: any) { - (expect(toJson(tree)) as any).toMatchSnapshot(); -} - /** * Helper function used to look up a component in the theme. Having this injected allows this module to not be dependent on the shape of * the theme used. @@ -139,8 +131,8 @@ describe('useTokens samples', () => { /** first render the component with no updates */ it('Sample1Text rendering with no overrides', () => { - const tree = mount(Sample1a); - snapshotTestTree(tree); + const tree = renderer.create(Sample1a).toJSON(); + expect(tree).toMatchSnapshot(); }); /** now re-theme the component via the components in the theme */ @@ -153,8 +145,8 @@ describe('useTokens samples', () => { }, }, }); - const tree = mount(Sample1b); - snapshotTestTree(tree); + const tree = renderer.create(Sample1b).toJSON(); + expect(tree).toMatchSnapshot(); }); /** @@ -192,13 +184,15 @@ describe('useTokens samples', () => { /** rendering the Sample2 component with the base theme */ it('Sample2Text rendering with defaults and a color override', () => { - const tree = mount( - - Sample2 with defaults - Sample2 with color override via prop - , - ); - snapshotTestTree(tree); + const tree = renderer + .create( + + Sample2 with defaults + Sample2 with color override via prop + , + ) + .toJSON(); + expect(tree).toMatchSnapshot(); }); /** now re-theme the component via the components in the theme */ @@ -211,12 +205,14 @@ describe('useTokens samples', () => { }, }, }); - const tree = mount( - - Sample2 with theme overrides set - Sample2 with theme and color prop override - , - ); - snapshotTestTree(tree); + const tree = renderer + .create( + + Sample2 with theme overrides set + Sample2 with theme and color prop override + , + ) + .toJSON(); + expect(tree).toMatchSnapshot(); }); }); diff --git a/packages/libraries/core/jest.setup.js b/packages/libraries/core/jest.setup.js deleted file mode 100644 index f7c454f890..0000000000 --- a/packages/libraries/core/jest.setup.js +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-check - -const enzyme = require('enzyme'); -const Adapter = require('@wojtekmaj/enzyme-adapter-react-17'); - -enzyme.configure({ adapter: new Adapter() }); diff --git a/packages/libraries/core/tsconfig.json b/packages/libraries/core/tsconfig.json index e6530c0a20..c02956dd07 100644 --- a/packages/libraries/core/tsconfig.json +++ b/packages/libraries/core/tsconfig.json @@ -16,8 +16,7 @@ "noUnusedLocals": true, "strict": true, "suppressImplicitAnyIndexErrors": true, - "lib": ["es6"], - "types": ["node", "jest"] + "lib": ["es6"] }, "include": ["src"] } diff --git a/packages/theming/android-theme/tsconfig.json b/packages/theming/android-theme/tsconfig.json index a96a8c036e..7e582b8e03 100644 --- a/packages/theming/android-theme/tsconfig.json +++ b/packages/theming/android-theme/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "outDir": "lib", - "resolveJsonModule": true, - "types": ["node", "jest"] + "resolveJsonModule": true }, "include": ["src"] } diff --git a/packages/theming/apple-theme/tsconfig.json b/packages/theming/apple-theme/tsconfig.json index a96a8c036e..7e582b8e03 100644 --- a/packages/theming/apple-theme/tsconfig.json +++ b/packages/theming/apple-theme/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "outDir": "lib", - "resolveJsonModule": true, - "types": ["node", "jest"] + "resolveJsonModule": true }, "include": ["src"] } diff --git a/packages/theming/default-theme/tsconfig.json b/packages/theming/default-theme/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/theming/default-theme/tsconfig.json +++ b/packages/theming/default-theme/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/theming/theme-tokens/tsconfig.json b/packages/theming/theme-tokens/tsconfig.json index a96a8c036e..7e582b8e03 100644 --- a/packages/theming/theme-tokens/tsconfig.json +++ b/packages/theming/theme-tokens/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "outDir": "lib", - "resolveJsonModule": true, - "types": ["node", "jest"] + "resolveJsonModule": true }, "include": ["src"] } diff --git a/packages/theming/theme-types/tsconfig.json b/packages/theming/theme-types/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/theming/theme-types/tsconfig.json +++ b/packages/theming/theme-types/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/theming/theming-utils/tsconfig.json b/packages/theming/theming-utils/tsconfig.json index b880046e45..2897c1e1b9 100644 --- a/packages/theming/theming-utils/tsconfig.json +++ b/packages/theming/theming-utils/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/theming/win32-theme/tsconfig.json b/packages/theming/win32-theme/tsconfig.json index fbf6da8bc3..f17f80fe2e 100644 --- a/packages/theming/win32-theme/tsconfig.json +++ b/packages/theming/win32-theme/tsconfig.json @@ -3,8 +3,7 @@ "compilerOptions": { "importHelpers": true, "outDir": "lib", - "resolveJsonModule": true, - "types": ["node", "jest"] + "resolveJsonModule": true }, "include": ["src"] } diff --git a/packages/utils/interactive-hooks/src/__tests__/useConst.test.tsx b/packages/utils/interactive-hooks/src/__tests__/useConst.test.tsx index 410c632ada..c53e45937e 100644 --- a/packages/utils/interactive-hooks/src/__tests__/useConst.test.tsx +++ b/packages/utils/interactive-hooks/src/__tests__/useConst.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { validateHookValueNotChanged } from '@fluentui-react-native/test-tools'; -import { mount } from 'enzyme'; +import * as renderer from 'react-test-renderer'; import { useConst } from '../useConst'; @@ -18,12 +18,12 @@ describe('useConst', () => { return {value}; }; - const wrapper = mount(); - const firstValue = wrapper.text(); + const wrapper = renderer.create(); + const firstValue = wrapper.toJSON(); // Re-render the component - wrapper.update(); + wrapper.update(); // Text should be the same - expect(wrapper.text()).toBe(firstValue); + expect(wrapper.toJSON()).toBe(firstValue); // Function shouldn't have been called again expect(initializer).toHaveBeenCalledTimes(1); }); @@ -36,9 +36,9 @@ describe('useConst', () => { return {value}; }; - const wrapper = mount(); + const wrapper = renderer.create(); // Re-render the component - wrapper.update(); + wrapper.update(); // Function shouldn't have been called again expect(initializer).toHaveBeenCalledTimes(1); }); diff --git a/packages/utils/interactive-hooks/src/__tests__/useControllableValue.test.tsx b/packages/utils/interactive-hooks/src/__tests__/useControllableValue.test.tsx index 634041bfc6..987cd34f60 100644 --- a/packages/utils/interactive-hooks/src/__tests__/useControllableValue.test.tsx +++ b/packages/utils/interactive-hooks/src/__tests__/useControllableValue.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { validateHookValueNotChanged } from '@fluentui-react-native/test-tools'; -import { mount } from 'enzyme'; +import * as renderer from 'react-test-renderer'; import { useControllableValue } from '../useControllableValue'; @@ -13,16 +13,16 @@ describe('useControllableValue', () => { return ; }; - const wrapper1 = mount(); + const wrapper1 = renderer.create(); expect(resultValue!).toBe(true); - wrapper1.setProps({ value: false }); + wrapper1.update(); expect(resultValue!).toBe(false); - const wrapper2 = mount(); + const wrapper2 = renderer.create(); expect(resultValue!).toBe(false); - wrapper2.setProps({ value: true }); + wrapper2.update(); expect(resultValue!).toBe(true); }); @@ -33,7 +33,7 @@ describe('useControllableValue', () => { return ; }; - mount(); + renderer.create(); expect(resultValue!).toBe(true); }); @@ -44,10 +44,10 @@ describe('useControllableValue', () => { return ; }; - const wrapper = mount(); + const wrapper = renderer.create(); expect(resultValue!).toBe(true); - wrapper.setProps({ defaultValue: false }); + wrapper.update(); expect(resultValue!).toBe(true); }); diff --git a/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx b/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx index 8b114f3db2..76df738426 100644 --- a/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx +++ b/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import { Pressable } from 'react-native'; -import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools'; import * as renderer from 'react-test-renderer'; import { useKeyProps } from '../useKeyProps'; @@ -37,20 +36,3 @@ it('useKeyProps called twice', () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); - -it('Pressable with useKeyProps simple rendering does not invalidate styling', () => { - const TestComponent = () => { - const keyboardProps = useKeyProps(dummyFunction, ' ', 'Enter'); - return ; - }; - - checkRenderConsistency(() => , 2); -}); - -it('Pressable with useKeyProps re-renders correctly', () => { - const TestComponent = () => { - const keyboardProps = useKeyProps(dummyFunction, ' ', 'Enter'); - return ; - }; - checkReRender(() => , 2); -}); diff --git a/packages/utils/interactive-hooks/tsconfig.json b/packages/utils/interactive-hooks/tsconfig.json index 65d97d1a91..feff7a3229 100644 --- a/packages/utils/interactive-hooks/tsconfig.json +++ b/packages/utils/interactive-hooks/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@fluentui-react-native/scripts/tsconfig.json", "compilerOptions": { "importHelpers": true, - "outDir": "lib", - "types": ["node", "jest"] + "outDir": "lib" }, "include": ["src"] } diff --git a/packages/utils/test-tools/README.md b/packages/utils/test-tools/README.md index 878c3fc69d..5b9f9416a5 100644 --- a/packages/utils/test-tools/README.md +++ b/packages/utils/test-tools/README.md @@ -1,3 +1,3 @@ # Test-tools -This is a dev environment only private package designed to aid in testing components via jest and enzyme +This is a dev environment only private package designed to aid in testing components via jest diff --git a/packages/utils/test-tools/package.json b/packages/utils/test-tools/package.json index 354d741881..e8122c85b9 100644 --- a/packages/utils/test-tools/package.json +++ b/packages/utils/test-tools/package.json @@ -1,7 +1,7 @@ { "name": "@fluentui-react-native/test-tools", "version": "0.1.1", - "description": "Tools and mocks for testing components using jest and enzyme", + "description": "Tools and mocks for testing components using jest", "main": "lib-commonjs/index.js", "module": "src/index.ts", "typings": "lib/index.d.ts", @@ -12,7 +12,6 @@ "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", "update-snapshots": "fluentui-scripts jest -u", "prettier": "fluentui-scripts prettier", "prettier-fix": "fluentui-scripts prettier --fix true" diff --git a/packages/utils/test-tools/src/baseTests.tsx b/packages/utils/test-tools/src/baseTests.tsx new file mode 100644 index 0000000000..32d6744321 --- /dev/null +++ b/packages/utils/test-tools/src/baseTests.tsx @@ -0,0 +1,43 @@ +import * as React from 'react'; + +import * as renderer from 'react-test-renderer'; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export function validateHookValueNotChanged[]>( + testDescription: string, + useHook: () => TValues, + useHookAgain?: () => TValues, +) { + it(testDescription || 'returns the same value(s) each time', () => { + let latestValues: TValues | undefined; + let callCount = 0; + + const TestComponent: React.FunctionComponent = () => { + callCount++; + // eslint-disable-next-line react-hooks/rules-of-hooks + latestValues = callCount === 1 ? useHook() : (useHookAgain || useHook)(); + return ; + }; + + const wrapper = renderer.create(); + expect(callCount).toBe(1); + const firstValues = latestValues; + expect(firstValues).toBeDefined(); + latestValues = undefined; + + wrapper.update(); + expect(callCount).toBe(2); + expect(latestValues).toBeDefined(); + expect(latestValues.length).toEqual(firstValues!.length); + + for (let i = 0; i < latestValues!.length; i++) { + try { + expect(latestValues![i]).toBe(firstValues![i]); + } catch (err) { + // Make a more informative error message + const valueText = latestValues![i].toString(); + expect('').toBe(`Identity of value at index ${i} has changed. This might help identify it:\n${valueText}`); + } + } + }); +} diff --git a/packages/utils/test-tools/src/enzymeTests.test.tsx b/packages/utils/test-tools/src/enzymeTests.test.tsx deleted file mode 100644 index 7a903ccc63..0000000000 --- a/packages/utils/test-tools/src/enzymeTests.test.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import * as React from 'react'; - -import { checkRenderConsistency, checkReRender } from './enzymeTests'; - -const fixedStyle = { - backgroundColor: 'blue', - color: 'red', -}; - -const subStyle = { - color: 'blue', -}; - -const Simple = (props) => { - const { children, ...rest } = props; - return ( - - {children} - - ); -}; - -const MultiLevel = (props) => { - const { children, style, color, ...rest } = props; - return ( -
- {children} - {color} -
- ); -}; - -const MultiLevelBroken = (props) => { - const { children, style, color, ...rest } = props; - return ( -
- {children} - {color} -
- ); -}; - -let renderCount = 0; - -const SimpleWithHook = (props) => { - const { children, ...rest } = props; - const onKeyUp = React.useMemo(() => { - console.log('something'); - }, []); - renderCount++; - return ( - - {children} - - ); -}; - -describe('enzyme component test validation', () => { - it('renders the simple control twice', () => { - checkRenderConsistency(() => Hello); - }); - - it('recurses into multi-level control correctly', () => { - checkRenderConsistency(() => World, 2); - }); - - it('handles memoed functions', () => { - const initialCount = renderCount; - checkReRender(() => ReRender); - expect(renderCount).toEqual(initialCount + 2); - }); - - it('catches a deep error for a broken multi-level component', () => { - try { - checkRenderConsistency(() => Broken, 2); - expect('This should have detected an error').toBeFalse(); - } catch (e) { - expect(e).toBeInstanceOf(Error); - expect((e as Error).message).toContain('Shallow compare'); - } - }); -}); diff --git a/packages/utils/test-tools/src/enzymeTests.tsx b/packages/utils/test-tools/src/enzymeTests.tsx deleted file mode 100644 index b26e7c0cf0..0000000000 --- a/packages/utils/test-tools/src/enzymeTests.tsx +++ /dev/null @@ -1,138 +0,0 @@ -import * as React from 'react'; - -import type { ReactWrapper } from 'enzyme'; -import { mount } from 'enzyme'; - -export type JSXProducer = () => JSX.Element; - -export interface PropTreeFilter { - children?: boolean; - functions?: boolean; -} - -export type PropTreeSnapshot = { - name: string; - // eslint-disable-next-line @typescript-eslint/ban-types - props: object; - children: PropTreeSnapshot[]; -}; - -export function snapshotPropTree(node: ReactWrapper, recurse: number, filter: PropTreeFilter = {}): PropTreeSnapshot { - // get a potentially filtered copy of the props - const nodeProps = node.props(); - const props = {}; - Object.keys(nodeProps).forEach((key) => { - if (!(filter.children && key === 'children') && !(filter.functions && typeof nodeProps[key] === 'function')) { - props[key] = nodeProps[key]; - } - }); - - // then build the base result - const result: PropTreeSnapshot = { name: node.name(), props, children: [] }; - - // if children are requested add children - if (recurse > 0) { - node.children().forEach((child) => { - result.children.push(snapshotPropTree(child, recurse - 1, filter)); - }); - } - return result; -} - -export function compareTrees(a: PropTreeSnapshot, b: PropTreeSnapshot, paths: string[]): void { - const newPaths = paths.concat(a.name); - if (a.name !== b.name) { - throw new Error(`Shallow compare found two nodes with different names at ${paths.join(': ')}`); - } - if (a.children.length !== b.children.length) { - throw new Error(`Shallow compare found two nodes at ${paths.join(': ')} with different children counts`); - } - if (Object.keys(a.props).length !== Object.keys(b.props).length) { - throw new Error(`Shallow compare found props at ${paths.join(': ')} with different property counts`); - } - Object.keys(a.props).forEach((key) => { - if (a.props[key] !== b.props[key]) { - // react-native's Pressable creates a new accessibilityState and accessibilityValue value on every render - // to avoid having to disable a bunch of tests adding this exception for now - if (key === 'accessibilityState') { - if (a.props[key].accessibilityState || b.props[key].accessibilityState) { - compareTrees(a.props[key].accessibilityState, b.props[key].accessibilityState, paths.concat('accessibilityState')); - } - } else if (key === 'accessibilityValue') { - if (a.props[key].accessibilityValue || b.props[key].accessibilityValue) { - compareTrees(a.props[key].accessibilityValue, b.props[key].accessibilityValue, paths.concat('accessibilityValue')); - } - } else { - throw new Error(`Shallow compare failed for ${paths.join(': ')}, key: ${key}`); - } - } - }); - for (let i = 0; i < a.children.length; i++) { - compareTrees(a.children[i], b.children[i], newPaths); - } -} - -export function checkRenderConsistency(render: JSXProducer, depth: number = 1) { - const filter = { children: true, functions: true }; - const t1 = snapshotPropTree(mount(render()), depth, filter); - const t2 = snapshotPropTree(mount(render()), depth, filter); - compareTrees(t1, t2, []); -} - -export function checkReRender(render: JSXProducer, depth: number = 1) { - const filter = { children: true }; - const w1 = mount(render()); - const t1 = snapshotPropTree(w1, depth, filter); - w1.setProps({}); - const w2 = w1.update(); - const t2 = snapshotPropTree(w2, depth, filter); - compareTrees(t1, t2, []); -} - -/** - * Validate that value(s) returned by a hook do not change in identity. - * @param testDescription - Custom test description - * @param useHook - Function to invoke the hook and return an array of return values which - * should not change - * @param useHookAgain - If you want to verify that the return value doesn't change when hook - * parameters change, you can pass this second callback which calls the hook differently. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export function validateHookValueNotChanged[]>( - testDescription: string, - useHook: () => TValues, - useHookAgain?: () => TValues, -) { - it(testDescription || 'returns the same value(s) each time', () => { - let latestValues: TValues | undefined; - let callCount = 0; - - const TestComponent: React.FunctionComponent = () => { - callCount++; - // eslint-disable-next-line react-hooks/rules-of-hooks - latestValues = callCount === 1 ? useHook() : (useHookAgain || useHook)(); - return ; - }; - - const wrapper = mount(); - expect(callCount).toBe(1); - const firstValues = latestValues; - expect(firstValues).toBeDefined(); - latestValues = undefined; - - wrapper.setProps({}); - expect(callCount).toBe(2); - expect(latestValues).toBeDefined(); - expect(latestValues.length).toEqual(firstValues!.length); - - for (let i = 0; i < latestValues!.length; i++) { - try { - expect(latestValues![i]).toBe(firstValues![i]); - } catch (err) { - // Make a more informative error message - const valueText = latestValues![i].toString(); - expect('').toBe(`Identity of value at index ${i} has changed. This might help identify it:\n${valueText}`); - } - } - }); -} diff --git a/packages/utils/test-tools/src/index.ts b/packages/utils/test-tools/src/index.ts index 17fa129e93..8d3a7aca25 100644 --- a/packages/utils/test-tools/src/index.ts +++ b/packages/utils/test-tools/src/index.ts @@ -1,3 +1,2 @@ -export { checkReRender, checkRenderConsistency, compareTrees, snapshotPropTree, validateHookValueNotChanged } from './enzymeTests'; -export type { JSXProducer, PropTreeFilter, PropTreeSnapshot } from './enzymeTests'; +export { validateHookValueNotChanged } from './baseTests'; export { mockTheme } from './mockTheme'; diff --git a/scripts/package.json b/scripts/package.json index 758bab83e6..c23266cae1 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -28,17 +28,13 @@ "@react-native-community/cli-platform-ios": "^12.1.1", "@react-native/metro-babel-transformer": "^0.73.0", "@rnx-kit/jest-preset": "^0.1.14", - "@types/enzyme": "^3.10.5", "@types/es6-collections": "^0.5.29", "@types/es6-promise": "0.0.32", "@types/jest": "^29.0.0", "@types/node": "^12.11.2", "@types/react-test-renderer": "16.9.0", "@uifabric/prettier-rules": "^7.0.3", - "@wojtekmaj/enzyme-adapter-react-17": "^0.6.5", "depcheck": "^1.0.0", - "enzyme": "^3.11.0", - "enzyme-to-json": "^3.5.0", "find-up": "^5.0.0", "fs-extra": "^7.0.1", "jest": "^29.2.1", diff --git a/scripts/src/configs/configureJest.ts b/scripts/src/configs/configureJest.ts index d6de72e82a..d50b1d581e 100644 --- a/scripts/src/configs/configureJest.ts +++ b/scripts/src/configs/configureJest.ts @@ -20,13 +20,11 @@ export function configureJest(customConfig?: object): object { KeyCodes: path.resolve(__dirname, 'jest/jest-mock.js'), // Jest is picking up the hoisted version of lru-cache, which is // incompatible from the version required by semver - 'lru-cache': require.resolve('lru-cache', {paths:[require.resolve('semver')]}), + 'lru-cache': require.resolve('lru-cache', { paths: [require.resolve('semver')] }), }, moduleFileExtensions, moduleDirectories: nodeModulesToRoot(), - snapshotSerializers: ['enzyme-to-json/serializer'], - // use babel-jest to transform files including typescript transform: { '^.+\\.(js|ts|tsx)?$': 'babel-jest', @@ -49,7 +47,6 @@ export function configureReactNativeJest(platform?: PlatformValue, customConfig? return jestPreset(ensurePlatform(platform, 'ios'), { roots: ['/src'], verbose: false, - setupFilesAfterEnv: [path.join(__dirname, 'jest', 'setupEnzyme.js')], ...customConfig, }); } diff --git a/scripts/src/configs/jest/setupEnzyme.js b/scripts/src/configs/jest/setupEnzyme.js deleted file mode 100644 index 808d060ef0..0000000000 --- a/scripts/src/configs/jest/setupEnzyme.js +++ /dev/null @@ -1,49 +0,0 @@ -// setup-tests.js -import 'react-native'; -import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; -import Enzyme from 'enzyme'; - -/** - * Set up DOM in node.js environment for Enzyme to mount to - */ -const { JSDOM } = require('jsdom'); - -const jsdom = new JSDOM('', { - // Fixes "SecurityError: localStorage is not available for opaque origins". - // See https://github.com/jsdom/jsdom/issues/2304#issuecomment-408320484 - url: 'https://localhost', -}); -const { window } = jsdom; - -function copyProps(src, target) { - Object.defineProperties(target, { - ...Object.getOwnPropertyDescriptors(src), - ...Object.getOwnPropertyDescriptors(target), - }); -} - -global.window = window; -global.document = window.document; -global.navigator = { - userAgent: 'node.js', -}; -copyProps(window, global); - -/** - * Hook console warnings because enzyme with react-native will generate some bogus warnings such as: - * Warning: is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements. - * Warning: The tag is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter - */ -const consoleErrorHandler = console.error; -console.error = (message, ...args) => { - const blockExpr = /.*(react-dom.development.js|Use PascalCase for React|is unrecognized in this browser)/i; - if (!blockExpr.test(message)) { - consoleErrorHandler(message, ...args); - } -}; - -/** - * Set up Enzyme to mount to DOM, simulate events, - * and inspect the DOM in tests. - */ -Enzyme.configure({ adapter: new Adapter() }); diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index 3ddb23cfe2..bf800e1a02 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "outDir": "./lib", "target": "es2015", + "types": ["node", "jest"], "module": "CommonJS", "moduleResolution": "node", "declaration": true, diff --git a/yarn.lock b/yarn.lock index 6183a0c109..8e251fa86c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4522,17 +4522,13 @@ __metadata: "@react-native-community/cli-platform-ios": "npm:^12.1.1" "@react-native/metro-babel-transformer": "npm:^0.73.0" "@rnx-kit/jest-preset": "npm:^0.1.14" - "@types/enzyme": "npm:^3.10.5" "@types/es6-collections": "npm:^0.5.29" "@types/es6-promise": "npm:0.0.32" "@types/jest": "npm:^29.0.0" "@types/node": "npm:^12.11.2" "@types/react-test-renderer": "npm:16.9.0" "@uifabric/prettier-rules": "npm:^7.0.3" - "@wojtekmaj/enzyme-adapter-react-17": "npm:^0.6.5" depcheck: "npm:^1.0.0" - enzyme: "npm:^3.11.0" - enzyme-to-json: "npm:^3.5.0" find-up: "npm:^5.0.0" fs-extra: "npm:^7.0.1" jest: "npm:^29.2.1" @@ -7479,15 +7475,6 @@ __metadata: languageName: node linkType: hard -"@types/cheerio@npm:*, @types/cheerio@npm:^0.22.22": - version: 0.22.31 - resolution: "@types/cheerio@npm:0.22.31" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/f16e9e67e3af530c3603b4b9f7651b9223ca72944afccaa31dd39be858a90bd48d5206d36b05998a0389fedca158f22430f96796007000f34b2dd8dd6b193f6e - languageName: node - linkType: hard - "@types/chokidar@npm:^2.1.3": version: 2.1.3 resolution: "@types/chokidar@npm:2.1.3" @@ -7506,16 +7493,6 @@ __metadata: languageName: node linkType: hard -"@types/enzyme@npm:^3.10.5": - version: 3.10.18 - resolution: "@types/enzyme@npm:3.10.18" - dependencies: - "@types/cheerio": "npm:*" - "@types/react": "npm:^16" - checksum: 10c0/c156d04e87dc4b01b5a8516bbcc2d127040506cf4d75efc2bb6ac9d4babc7db2895af207a6e95b68ff0f1f593bf84a6499417423b89294c1f0468d3809652dd2 - languageName: node - linkType: hard - "@types/es6-collections@npm:^0.5.29": version: 0.5.36 resolution: "@types/es6-collections@npm:0.5.36" @@ -8775,38 +8752,6 @@ __metadata: languageName: node linkType: hard -"@wojtekmaj/enzyme-adapter-react-17@npm:^0.6.5": - version: 0.6.7 - resolution: "@wojtekmaj/enzyme-adapter-react-17@npm:0.6.7" - dependencies: - "@wojtekmaj/enzyme-adapter-utils": "npm:^0.1.4" - enzyme-shallow-equal: "npm:^1.0.0" - has: "npm:^1.0.0" - prop-types: "npm:^15.7.0" - react-is: "npm:^17.0.0" - react-test-renderer: "npm:^17.0.0" - peerDependencies: - enzyme: ^3.0.0 - react: ^17.0.0-0 - react-dom: ^17.0.0-0 - checksum: 10c0/f05493ee9aee235781a7f7447c21f580629dc86662af3167c2131b869aa138aaeafeeb41d2e6fe6616c68eed49a416baba2ef23aa40e9b781bce0d3a64d35be1 - languageName: node - linkType: hard - -"@wojtekmaj/enzyme-adapter-utils@npm:^0.1.4": - version: 0.1.4 - resolution: "@wojtekmaj/enzyme-adapter-utils@npm:0.1.4" - dependencies: - function.prototype.name: "npm:^1.1.0" - has: "npm:^1.0.0" - object.fromentries: "npm:^2.0.0" - prop-types: "npm:^15.7.0" - peerDependencies: - react: ^17.0.0-0 - checksum: 10c0/3d192b914e296fab89b35b9c0b7f0ba3181dbfa71181a5748c232de4e4089e41bb6048e71c6708921c83001530a91e4e124860a2d5f1f2cdd875c59555ce7f34 - languageName: node - linkType: hard - "@xmldom/xmldom@npm:^0.7.7": version: 0.7.9 resolution: "@xmldom/xmldom@npm:0.7.9" @@ -9578,19 +9523,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.filter@npm:^1.0.0": - version: 1.0.2 - resolution: "array.prototype.filter@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-array-method-boxes-properly: "npm:^1.0.0" - is-string: "npm:^1.0.7" - checksum: 10c0/f49da13cb9110c7caede682e22b32208aaaea3b5d9760e5b417e3d62d72b5a092f0c26ad648879900cd9694371fc75e47f80a08b6a1eb5e3cc15976e8f4bc0c7 - languageName: node - linkType: hard - "array.prototype.findlastindex@npm:^1.2.5": version: 1.2.5 resolution: "array.prototype.findlastindex@npm:1.2.5" @@ -9605,7 +9537,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.flat@npm:^1.2.3, array.prototype.flat@npm:^1.3.2": +"array.prototype.flat@npm:^1.3.2": version: 1.3.2 resolution: "array.prototype.flat@npm:1.3.2" dependencies: @@ -10550,7 +10482,7 @@ __metadata: languageName: node linkType: hard -"cheerio@npm:^1.0.0-rc.10, cheerio@npm:^1.0.0-rc.3": +"cheerio@npm:^1.0.0-rc.10": version: 1.0.0-rc.12 resolution: "cheerio@npm:1.0.0-rc.12" dependencies: @@ -10909,7 +10841,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^2.19.0, commander@npm:^2.20.0": +"commander@npm:^2.20.0": version: 2.20.3 resolution: "commander@npm:2.20.3" checksum: 10c0/74c781a5248c2402a0a3e966a0a2bba3c054aad144f5c023364be83265e796b20565aa9feff624132ff629aa64e16999fa40a743c10c12f7c61e96a794b99288 @@ -11784,13 +11716,6 @@ __metadata: languageName: node linkType: hard -"discontinuous-range@npm:1.0.0": - version: 1.0.0 - resolution: "discontinuous-range@npm:1.0.0" - checksum: 10c0/487b105f83c1cc528e25e65d3c4b73958ec79769b7bd0e264414702a23a7e2b282c72982b4bef4af29fcab53f47816c3f0a5c40d85a99a490f4bc35b83dc00f8 - languageName: node - linkType: hard - "doctrine@npm:^2.1.0": version: 2.1.0 resolution: "doctrine@npm:2.1.0" @@ -12061,59 +11986,6 @@ __metadata: languageName: node linkType: hard -"enzyme-shallow-equal@npm:^1.0.0, enzyme-shallow-equal@npm:^1.0.1": - version: 1.0.5 - resolution: "enzyme-shallow-equal@npm:1.0.5" - dependencies: - has: "npm:^1.0.3" - object-is: "npm:^1.1.5" - checksum: 10c0/30ace0c5be2d454fb001a50dd30791c18e1f86b3b7238456b464921017f6add73ea6b2a2527f1e96958d8bfe84d0afcba30b0c9e4087ebda2feb42b7800419c4 - languageName: node - linkType: hard - -"enzyme-to-json@npm:^3.5.0": - version: 3.6.2 - resolution: "enzyme-to-json@npm:3.6.2" - dependencies: - "@types/cheerio": "npm:^0.22.22" - lodash: "npm:^4.17.21" - react-is: "npm:^16.12.0" - peerDependencies: - enzyme: ^3.4.0 - checksum: 10c0/90fba5bbcfda37f456d483a46d7a077123fb65f74e59bab1e137e30c84f5b3149114efae7f9736f7ea49dd9171299645816bc5f6649b16a19d47c8bd1d6d8065 - languageName: node - linkType: hard - -"enzyme@npm:^3.11.0": - version: 3.11.0 - resolution: "enzyme@npm:3.11.0" - dependencies: - array.prototype.flat: "npm:^1.2.3" - cheerio: "npm:^1.0.0-rc.3" - enzyme-shallow-equal: "npm:^1.0.1" - function.prototype.name: "npm:^1.1.2" - has: "npm:^1.0.3" - html-element-map: "npm:^1.2.0" - is-boolean-object: "npm:^1.0.1" - is-callable: "npm:^1.1.5" - is-number-object: "npm:^1.0.4" - is-regex: "npm:^1.0.5" - is-string: "npm:^1.0.5" - is-subset: "npm:^0.1.1" - lodash.escape: "npm:^4.0.1" - lodash.isequal: "npm:^4.5.0" - object-inspect: "npm:^1.7.0" - object-is: "npm:^1.0.2" - object.assign: "npm:^4.1.0" - object.entries: "npm:^1.1.1" - object.values: "npm:^1.1.1" - raf: "npm:^3.4.1" - rst-selector-parser: "npm:^2.2.3" - string.prototype.trim: "npm:^1.2.1" - checksum: 10c0/14081671ed77924026036ed4edb1168cdac826aadd1ab2c77a5b7fdda625589dc5a4062cd0c65ec88add3ea3f7c0ebcbf3178bcf84b43335a175d8c71a016809 - languageName: node - linkType: hard - "err-code@npm:^2.0.2": version: 2.0.3 resolution: "err-code@npm:2.0.3" @@ -12203,13 +12075,6 @@ __metadata: languageName: node linkType: hard -"es-array-method-boxes-properly@npm:^1.0.0": - version: 1.0.0 - resolution: "es-array-method-boxes-properly@npm:1.0.0" - checksum: 10c0/4b7617d3fbd460d6f051f684ceca6cf7e88e6724671d9480388d3ecdd72119ddaa46ca31f2c69c5426a82e4b3091c1e81867c71dcdc453565cd90005ff2c382d - languageName: node - linkType: hard - "es-define-property@npm:^1.0.0": version: 1.0.0 resolution: "es-define-property@npm:1.0.0" @@ -13398,14 +13263,14 @@ __metadata: languageName: node linkType: hard -"function-bind@npm:^1.1.1, function-bind@npm:^1.1.2": +"function-bind@npm:^1.1.2": version: 1.1.2 resolution: "function-bind@npm:1.1.2" checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 languageName: node linkType: hard -"function.prototype.name@npm:^1.1.0, function.prototype.name@npm:^1.1.2, function.prototype.name@npm:^1.1.6": +"function.prototype.name@npm:^1.1.6": version: 1.1.6 resolution: "function.prototype.name@npm:1.1.6" dependencies: @@ -13948,15 +13813,6 @@ __metadata: languageName: node linkType: hard -"has@npm:^1.0.0, has@npm:^1.0.3": - version: 1.0.3 - resolution: "has@npm:1.0.3" - dependencies: - function-bind: "npm:^1.1.1" - checksum: 10c0/e1da0d2bd109f116b632f27782cf23182b42f14972ca9540e4c5aa7e52647407a0a4a76937334fddcb56befe94a3494825ec22b19b51f5e5507c3153fd1a5e1b - languageName: node - linkType: hard - "hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": version: 2.0.2 resolution: "hasown@npm:2.0.2" @@ -14060,16 +13916,6 @@ __metadata: languageName: node linkType: hard -"html-element-map@npm:^1.2.0": - version: 1.3.1 - resolution: "html-element-map@npm:1.3.1" - dependencies: - array.prototype.filter: "npm:^1.0.0" - call-bind: "npm:^1.0.2" - checksum: 10c0/5ae8b37546601864eb41363a05871a896df36e59714607b1386a114d45f1c6b6cd1633d6fb09e09e5ee0f1c909d6b9c1bbca831333b8eef936312f61b1b5ecb8 - languageName: node - linkType: hard - "html-encoding-sniffer@npm:^4.0.0": version: 4.0.0 resolution: "html-encoding-sniffer@npm:4.0.0" @@ -14547,7 +14393,7 @@ __metadata: languageName: node linkType: hard -"is-boolean-object@npm:^1.0.1, is-boolean-object@npm:^1.1.0": +"is-boolean-object@npm:^1.1.0": version: 1.1.2 resolution: "is-boolean-object@npm:1.1.2" dependencies: @@ -14557,7 +14403,7 @@ __metadata: languageName: node linkType: hard -"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.1.5, is-callable@npm:^1.2.7": +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" checksum: 10c0/ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f @@ -14727,7 +14573,7 @@ __metadata: languageName: node linkType: hard -"is-regex@npm:^1.0.5, is-regex@npm:^1.1.4": +"is-regex@npm:^1.1.4": version: 1.1.4 resolution: "is-regex@npm:1.1.4" dependencies: @@ -14801,13 +14647,6 @@ __metadata: languageName: node linkType: hard -"is-subset@npm:^0.1.1": - version: 0.1.1 - resolution: "is-subset@npm:0.1.1" - checksum: 10c0/d8125598ab9077a76684e18726fb915f5cea7a7358ed0c6ff723f4484d71a0a9981ee5aae06c44de99cfdef0fefce37438c6257ab129e53c82045ea0c2acdebf - languageName: node - linkType: hard - "is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": version: 1.0.4 resolution: "is-symbol@npm:1.0.4" @@ -16162,13 +16001,6 @@ __metadata: languageName: node linkType: hard -"lodash.escape@npm:^4.0.1": - version: 4.0.1 - resolution: "lodash.escape@npm:4.0.1" - checksum: 10c0/90ade409cec05b6869090476952fdfb84d4d87b1ff4a0e03ebd590f980d9a1248d93ba14579f10d80c6429e4d6af13ba137c28db64cae6dadb71442e54a3ad2b - languageName: node - linkType: hard - "lodash.flattendeep@npm:^4.4.0": version: 4.4.0 resolution: "lodash.flattendeep@npm:4.4.0" @@ -17158,13 +16990,6 @@ __metadata: languageName: node linkType: hard -"moo@npm:^0.5.0": - version: 0.5.2 - resolution: "moo@npm:0.5.2" - checksum: 10c0/a9d9ad8198a51fe35d297f6e9fdd718298ca0b39a412e868a0ebd92286379ab4533cfc1f1f34516177f5129988ab25fe598f78e77c84e3bfe0d4a877b56525a8 - languageName: node - linkType: hard - "morgan@npm:1.10.0": version: 1.10.0 resolution: "morgan@npm:1.10.0" @@ -17285,23 +17110,6 @@ __metadata: languageName: node linkType: hard -"nearley@npm:^2.7.10": - version: 2.20.1 - resolution: "nearley@npm:2.20.1" - dependencies: - commander: "npm:^2.19.0" - moo: "npm:^0.5.0" - railroad-diagrams: "npm:^1.0.0" - randexp: "npm:0.4.6" - bin: - nearley-railroad: bin/nearley-railroad.js - nearley-test: bin/nearley-test.js - nearley-unparse: bin/nearley-unparse.js - nearleyc: bin/nearleyc.js - checksum: 10c0/d25e1fd40b19c53a0ada6a688670f4a39063fd9553ab62885e81a82927d51572ce47193b946afa3d85efa608ba2c68f433c421f69b854bfb7f599eacb5fae37e - languageName: node - linkType: hard - "needle@npm:^3.3.1": version: 3.3.1 resolution: "needle@npm:3.3.1" @@ -17610,14 +17418,14 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.12.0, object-inspect@npm:^1.13.1, object-inspect@npm:^1.7.0": +"object-inspect@npm:^1.12.0, object-inspect@npm:^1.13.1": version: 1.13.1 resolution: "object-inspect@npm:1.13.1" checksum: 10c0/fad603f408e345c82e946abdf4bfd774260a5ed3e5997a0b057c44153ac32c7271ff19e3a5ae39c858da683ba045ccac2f65245c12763ce4e8594f818f4a648d languageName: node linkType: hard -"object-is@npm:^1.0.2, object-is@npm:^1.1.5": +"object-is@npm:^1.1.5": version: 1.1.5 resolution: "object-is@npm:1.1.5" dependencies: @@ -17634,7 +17442,7 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.1.0, object.assign@npm:^4.1.3, object.assign@npm:^4.1.4, object.assign@npm:^4.1.5": +"object.assign@npm:^4.1.3, object.assign@npm:^4.1.4, object.assign@npm:^4.1.5": version: 4.1.5 resolution: "object.assign@npm:4.1.5" dependencies: @@ -17646,7 +17454,7 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.1, object.entries@npm:^1.1.6": +"object.entries@npm:^1.1.6": version: 1.1.6 resolution: "object.entries@npm:1.1.6" dependencies: @@ -17657,7 +17465,7 @@ __metadata: languageName: node linkType: hard -"object.fromentries@npm:^2.0.0, object.fromentries@npm:^2.0.6, object.fromentries@npm:^2.0.8": +"object.fromentries@npm:^2.0.6, object.fromentries@npm:^2.0.8": version: 2.0.8 resolution: "object.fromentries@npm:2.0.8" dependencies: @@ -17690,7 +17498,7 @@ __metadata: languageName: node linkType: hard -"object.values@npm:^1.1.1, object.values@npm:^1.1.6, object.values@npm:^1.2.0": +"object.values@npm:^1.1.6, object.values@npm:^1.2.0": version: 1.2.0 resolution: "object.values@npm:1.2.0" dependencies: @@ -18260,13 +18068,6 @@ __metadata: languageName: node linkType: hard -"performance-now@npm:^2.1.0": - version: 2.1.0 - resolution: "performance-now@npm:2.1.0" - checksum: 10c0/22c54de06f269e29f640e0e075207af57de5052a3d15e360c09b9a8663f393f6f45902006c1e71aa8a5a1cdfb1a47fe268826f8496d6425c362f00f5bc3e85d9 - languageName: node - linkType: hard - "picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": version: 1.0.1 resolution: "picocolors@npm:1.0.1" @@ -18500,7 +18301,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:^15.7.0, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": +"prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -18665,32 +18466,6 @@ __metadata: languageName: node linkType: hard -"raf@npm:^3.4.1": - version: 3.4.1 - resolution: "raf@npm:3.4.1" - dependencies: - performance-now: "npm:^2.1.0" - checksum: 10c0/337f0853c9e6a77647b0f499beedafea5d6facfb9f2d488a624f88b03df2be72b8a0e7f9118a3ff811377d534912039a3311815700d2b6d2313f82f736f9eb6e - languageName: node - linkType: hard - -"railroad-diagrams@npm:^1.0.0": - version: 1.0.0 - resolution: "railroad-diagrams@npm:1.0.0" - checksum: 10c0/81bf8f86870a69fb9ed243102db9ad6416d09c4cb83964490d44717690e07dd982f671503236a1f8af28f4cb79d5d7a87613930f10ac08defa845ceb6764e364 - languageName: node - linkType: hard - -"randexp@npm:0.4.6": - version: 0.4.6 - resolution: "randexp@npm:0.4.6" - dependencies: - discontinuous-range: "npm:1.0.0" - ret: "npm:~0.1.10" - checksum: 10c0/14ee14b6d7f5ce69609b51cc914fb7a7c82ad337820a141c5f762c5ad1fe868f5191ea6e82359aee019b625ee1359486628fa833909d12c3b5dd9571908c3345 - languageName: node - linkType: hard - "range-parser@npm:~1.2.1": version: 1.2.1 resolution: "range-parser@npm:1.2.1" @@ -18746,14 +18521,14 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^16.12.0, react-is@npm:^16.13.1": +"react-is@npm:^16.13.1": version: 16.13.1 resolution: "react-is@npm:16.13.1" checksum: 10c0/33977da7a5f1a287936a0c85639fec6ca74f4f15ef1e59a6bc20338fc73dc69555381e211f7a3529b8150a1f71e4225525b41b60b52965bda53ce7d47377ada1 languageName: node linkType: hard -"react-is@npm:^17.0.0, react-is@npm:^17.0.1, react-is@npm:^17.0.2": +"react-is@npm:^17.0.1": version: 17.0.2 resolution: "react-is@npm:17.0.2" checksum: 10c0/2bdb6b93fbb1820b024b496042cce405c57e2f85e777c9aabd55f9b26d145408f9f74f5934676ffdc46f3dcff656d78413a6e43968e7b3f92eea35b3052e9053 @@ -18990,7 +18765,7 @@ __metadata: languageName: node linkType: hard -"react-shallow-renderer@npm:^16.13.1, react-shallow-renderer@npm:^16.15.0": +"react-shallow-renderer@npm:^16.15.0": version: 16.15.0 resolution: "react-shallow-renderer@npm:16.15.0" dependencies: @@ -19015,20 +18790,6 @@ __metadata: languageName: node linkType: hard -"react-test-renderer@npm:^17.0.0": - version: 17.0.2 - resolution: "react-test-renderer@npm:17.0.2" - dependencies: - object-assign: "npm:^4.1.1" - react-is: "npm:^17.0.2" - react-shallow-renderer: "npm:^16.13.1" - scheduler: "npm:^0.20.2" - peerDependencies: - react: 17.0.2 - checksum: 10c0/a4ea1e745a87bb9015540d96a3077b614bf88e306a0edd639f8fb849a393fa5104e84eca4349bc4b026f2f0b115a4172d58950d7076316115795266557659276 - languageName: node - linkType: hard - "react@npm:18.2.0": version: 18.2.0 resolution: "react@npm:18.2.0" @@ -19494,13 +19255,6 @@ __metadata: languageName: node linkType: hard -"ret@npm:~0.1.10": - version: 0.1.15 - resolution: "ret@npm:0.1.15" - checksum: 10c0/01f77cad0f7ea4f955852c03d66982609893edc1240c0c964b4c9251d0f9fb6705150634060d169939b096d3b77f4c84d6b6098a5b5d340160898c8581f1f63f - languageName: node - linkType: hard - "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -19584,16 +19338,6 @@ __metadata: languageName: node linkType: hard -"rst-selector-parser@npm:^2.2.3": - version: 2.2.3 - resolution: "rst-selector-parser@npm:2.2.3" - dependencies: - lodash.flattendeep: "npm:^4.4.0" - nearley: "npm:^2.7.10" - checksum: 10c0/b631aca2cb451fbde8d78dbc9a9479f20f1f40565cd8eb63773cb6e2a395ed87b392291986b84c2c7da68b70084e3469fbe958261300a10dff41c87fa3bc58aa - languageName: node - linkType: hard - "rtl-css-js@npm:^1.16.0": version: 1.16.1 resolution: "rtl-css-js@npm:1.16.1" @@ -19736,16 +19480,6 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.20.2": - version: 0.20.2 - resolution: "scheduler@npm:0.20.2" - dependencies: - loose-envify: "npm:^1.1.0" - object-assign: "npm:^4.1.1" - checksum: 10c0/b0982e4b0f34f4ffa4f2f486161c0fd9ce9b88680b045dccbf250eb1aa4fd27413570645455187a83535e2370f5c667a251045547765408492bd883cbe95fcdb - languageName: node - linkType: hard - "scheduler@npm:^0.23.0, scheduler@npm:^0.23.2": version: 0.23.2 resolution: "scheduler@npm:0.23.2" @@ -20443,7 +20177,7 @@ __metadata: languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.1, string.prototype.trim@npm:^1.2.9": +"string.prototype.trim@npm:^1.2.9": version: 1.2.9 resolution: "string.prototype.trim@npm:1.2.9" dependencies: