Skip to content

Commit

Permalink
chore: remove enzyme tests (#3848)
Browse files Browse the repository at this point in the history
* remove checkRenderConsistency / checkReRender tests

* port rest of enzyme tests to react-test-renderer

* remove the rest of enzyme

* Change files

* fix tsconfig for jest types

* Change files

* undo most of changes to framework tsconfig
  • Loading branch information
Saadnajmi authored Jan 29, 2025
1 parent f870cd2 commit 5ca24ac
Show file tree
Hide file tree
Showing 145 changed files with 945 additions and 2,105 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
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', () => {
const tree = renderer.create(<ComponentName>Your component</ComponentName>).toJSON();
expect(tree).toMatchSnapshot();
});

it('ComponentName simple rendering does not invalidate styling', () => {
checkRenderConsistency(() => <ComponentName>Default ComponentName</ComponentName>, 2);
});

it('ComponentName re-renders correctly', () => {
checkReRender(() => <ComponentName>Render twice</ComponentName>, 2);
});

// Feel free to add more tests here
});
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": "@fluentui-react-native/scripts/tsconfig.json",
"compilerOptions": {
"outDir": "lib",
"types": ["node", "jest"]
"outDir": "lib"
},
"include": ["src"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui/react-native",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/android-theme",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/apple-theme",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/avatar",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/badge",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/button",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/callout",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/checkbox",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/chip",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/codemods",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/composition",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/contextual-menu",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/default-theme",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/divider",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/drawer",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/experimental-avatar",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/experimental-menu-button",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/experimental-shadow",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/experimental-shimmer",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/focus-trap-zone",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/focus-zone",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/framework",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/icon",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/input",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/interactive-hooks",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/link",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/menu",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/menu-button",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/notification",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/overflow",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/popover",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/radio-group",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/separator",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/stack",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/switch",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/tablist",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/text",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/theme",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/theme-tokens",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/theme-types",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix tsconfig for jest types",
"packageName": "@fluentui-react-native/theming-utils",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/tooltip",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/use-slot",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/use-slots",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/use-styling",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove enzyme tests",
"packageName": "@fluentui-react-native/use-tokens",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Loading

0 comments on commit 5ca24ac

Please sign in to comment.