Skip to content

Commit 7d9e5df

Browse files
committed
remove checkRenderConsistency / checkReRender tests
1 parent 633da1c commit 7d9e5df

File tree

23 files changed

+0
-443
lines changed

23 files changed

+0
-443
lines changed
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
import * as React from 'react';
22
import { ComponentName } from '../ComponentName';
33
import * as renderer from 'react-test-renderer';
4-
import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools';
54

65
describe('ComponentName component tests', () => {
76
it('ComponentName default', () => {
87
const tree = renderer.create(<ComponentName>Your component</ComponentName>).toJSON();
98
expect(tree).toMatchSnapshot();
109
});
1110

12-
it('ComponentName simple rendering does not invalidate styling', () => {
13-
checkRenderConsistency(() => <ComponentName>Default ComponentName</ComponentName>, 2);
14-
});
15-
16-
it('ComponentName re-renders correctly', () => {
17-
checkReRender(() => <ComponentName>Render twice</ComponentName>, 2);
18-
});
19-
2011
// Feel free to add more tests here
2112
});

packages/components/Badge/src/__tests__/Badge.test.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22

3-
import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools';
43
import * as renderer from 'react-test-renderer';
54

65
import { Badge, CounterBadge, PresenceBadge } from '../';
@@ -44,14 +43,6 @@ describe('Badge component tests', () => {
4443
const tree = renderer.create(<BadgeWithShadow appearance="filled">Badge with shadow</BadgeWithShadow>).toJSON();
4544
expect(tree).toMatchSnapshot();
4645
});
47-
48-
it('Check checkRenderConsistency for Badge', () => {
49-
checkRenderConsistency(() => <Badge />, 2);
50-
});
51-
52-
it('Badge re-renders correctly', () => {
53-
checkReRender(() => <Badge />, 2);
54-
});
5546
});
5647

5748
describe('PresenceBadge component tests', () => {

packages/components/Button/src/Button.test.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as React from 'react';
22
import { Pressable, Text } from 'react-native';
33

44
import { Icon } from '@fluentui-react-native/icon';
5-
import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools';
65
import * as renderer from 'react-test-renderer';
76

87
import { Button } from './Button';
@@ -65,22 +64,4 @@ describe('Button component tests', () => {
6564
const tree = renderer.create(<ComposedButton>Composed Button with RNText</ComposedButton>).toJSON();
6665
expect(tree).toMatchSnapshot();
6766
});
68-
69-
it('Button simple rendering does not invalidate styling', () => {
70-
checkRenderConsistency(() => <Button>Default button</Button>, 2);
71-
});
72-
73-
it('Button re-renders correctly', () => {
74-
checkReRender(() => <Button>Render twice</Button>, 2);
75-
});
76-
77-
it('Button shares produced styles across multiple renders', () => {
78-
const style = { backgroundColor: 'black' };
79-
checkRenderConsistency(() => <Button style={style}>Shared styles</Button>, 2);
80-
});
81-
82-
it('Button re-renders correctly with style', () => {
83-
const style = { borderColor: 'blue' };
84-
checkReRender(() => <Button style={style}>Shared Style Render</Button>, 2);
85-
});
8667
});
Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22

3-
import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools';
43
import * as renderer from 'react-test-renderer';
54

65
import { CompoundButton } from './CompoundButton';
@@ -9,21 +8,3 @@ it('CompoundButton default', () => {
98
const tree = renderer.create(<CompoundButton secondaryContent="sublabel">Default Button</CompoundButton>).toJSON();
109
expect(tree).toMatchSnapshot();
1110
});
12-
13-
it('Button simple rendering does not invalidate styling', () => {
14-
checkRenderConsistency(() => <CompoundButton>Default button</CompoundButton>, 2);
15-
});
16-
17-
it('Button re-renders correctly', () => {
18-
checkReRender(() => <CompoundButton>Render twice</CompoundButton>, 2);
19-
});
20-
21-
it('Button shares produced styles across multiple renders', () => {
22-
const style = { backgroundColor: 'black' };
23-
checkRenderConsistency(() => <CompoundButton style={style}>Shared styles</CompoundButton>, 2);
24-
});
25-
26-
it('Button re-renders correctly with style', () => {
27-
const style = { borderColor: 'blue' };
28-
checkReRender(() => <CompoundButton style={style}>Shared Style Render</CompoundButton>, 2);
29-
});
Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22

3-
import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools';
43
import * as renderer from 'react-test-renderer';
54

65
import { FAB } from './FAB';
@@ -30,38 +29,6 @@ it('Custom FAB with no shadow(iOS)', () => {
3029
expect(tree).toMatchSnapshot();
3130
});
3231

33-
it('Button simple rendering does not invalidate styling', () => {
34-
checkRenderConsistency(() => <FAB icon={iconProps}>Default FAB</FAB>, 2);
35-
});
36-
37-
it('FAB re-renders correctly', () => {
38-
checkReRender(() => <FAB icon={iconProps}>Render twice</FAB>, 2);
39-
});
40-
41-
it('FAB shares produced styles across multiple renders', () => {
42-
const style = { backgroundColor: 'black' };
43-
checkRenderConsistency(
44-
() => (
45-
<FAB icon={iconProps} style={style}>
46-
Shared styles
47-
</FAB>
48-
),
49-
2,
50-
);
51-
});
52-
53-
it('FAB re-renders correctly with style', () => {
54-
const style = { borderColor: 'blue' };
55-
checkReRender(
56-
() => (
57-
<FAB icon={iconProps} style={style}>
58-
Shared Style Render
59-
</FAB>
60-
),
61-
2,
62-
);
63-
});
64-
6532
afterAll(() => {
6633
jest.unmock('react-native/Libraries/Utilities/Platform');
6734
});
Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22

3-
import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools';
43
import * as renderer from 'react-test-renderer';
54

65
import { ToggleButton } from './ToggleButton';
@@ -9,21 +8,3 @@ it('ToggleButton default', () => {
98
const tree = renderer.create(<ToggleButton>Default Button</ToggleButton>).toJSON();
109
expect(tree).toMatchSnapshot();
1110
});
12-
13-
it('Button simple rendering does not invalidate styling', () => {
14-
checkRenderConsistency(() => <ToggleButton>Default button</ToggleButton>, 2);
15-
});
16-
17-
it('Button re-renders correctly', () => {
18-
checkReRender(() => <ToggleButton>Render twice</ToggleButton>, 2);
19-
});
20-
21-
it('Button shares produced styles across multiple renders', () => {
22-
const style = { backgroundColor: 'black' };
23-
checkRenderConsistency(() => <ToggleButton style={style}>Shared styles</ToggleButton>, 2);
24-
});
25-
26-
it('Button re-renders correctly with style', () => {
27-
const style = { borderColor: 'blue' };
28-
checkReRender(() => <ToggleButton style={style}>Shared Style Render</ToggleButton>, 2);
29-
});

packages/components/Checkbox/src/__tests__/Checkbox.test.tsx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import * as React from 'react';
2-
import type { AccessibilityActionName } from 'react-native';
32
import { Text, View } from 'react-native';
43

54
import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks';
6-
import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools';
75
import { Svg } from 'react-native-svg';
86
import * as renderer from 'react-test-renderer';
97

@@ -80,27 +78,4 @@ describe('Checkbox component tests', () => {
8078
const tree = renderer.create(<ComposedCheckbox label="Composed Button with RNText" />).toJSON();
8179
expect(tree).toMatchSnapshot();
8280
});
83-
84-
it('Checkbox simple rendering does not invalidate styling', () => {
85-
checkRenderConsistency(() => <Checkbox>Default button</Checkbox>, 2);
86-
});
87-
88-
it('Checkbox re-renders correctly', () => {
89-
checkReRender(() => <Checkbox>Render twice</Checkbox>, 2);
90-
});
91-
92-
it('Checkbox shares produced styles across multiple renders', () => {
93-
const style = { backgroundColor: 'black' };
94-
checkRenderConsistency(() => <Checkbox style={style}>Shared styles</Checkbox>, 2);
95-
});
96-
97-
it('Checkbox re-renders correctly with style', () => {
98-
const style = { borderColor: 'blue' };
99-
checkReRender(() => <Checkbox style={style}>Shared Style Render</Checkbox>, 2);
100-
});
101-
102-
it('Checkbox re-renders correctly with accessibilityAction', () => {
103-
const action = [{ name: 'Expand' as AccessibilityActionName }];
104-
checkReRender(() => <Checkbox accessibilityActions={action}>Shared Style Render</Checkbox>, 2);
105-
});
10681
});

packages/components/Chip/src/__tests__/Chip.test.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22

3-
import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools';
43
import * as renderer from 'react-test-renderer';
54

65
import { Chip } from '../';
@@ -30,12 +29,4 @@ describe('Chip component tests', () => {
3029
const tree = renderer.create(<ChipStyled>Chip Tokens</ChipStyled>).toJSON();
3130
expect(tree).toMatchSnapshot();
3231
});
33-
34-
it('Check checkRenderConsistency for Chip', () => {
35-
checkRenderConsistency(() => <Chip />, 2);
36-
});
37-
38-
it('Chip re-renders correctly', () => {
39-
checkReRender(() => <Chip />, 2);
40-
});
4132
});

packages/components/Divider/src/__tests__/Divider.test.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22

3-
import { checkReRender } from '@fluentui-react-native/test-tools';
43
import * as renderer from 'react-test-renderer';
54

65
import { Divider } from '../Divider';
@@ -95,8 +94,4 @@ describe('Divider component tests', () => {
9594
const tree = renderer.create(<CustomDivider {...props}>Hello</CustomDivider>).toJSON();
9695
expect(tree).toMatchSnapshot();
9796
});
98-
99-
it('Divider re-renders correctly', () => {
100-
checkReRender(() => <Divider />, 2);
101-
});
10297
});

packages/components/Icon/src/__tests__/Icon.test.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22

3-
import { checkRenderConsistency, checkReRender } from '@fluentui-react-native/test-tools';
43
import { Path, Svg } from 'react-native-svg';
54
import * as renderer from 'react-test-renderer';
65

@@ -45,12 +44,4 @@ describe('Icon component tests', () => {
4544
const tree = renderer.create(<IconV1 svgSource={{ src: AccessTime20RegularIcon, width: 20, height: 20 }} />).toJSON();
4645
expect(tree).toMatchSnapshot();
4746
});
48-
49-
it('Icon checkRenderConsistency', () => {
50-
checkRenderConsistency(() => <FontIcon {...fontProps} />, 2);
51-
});
52-
53-
it('Icon re-renders correctly', () => {
54-
checkReRender(() => <FontIcon {...fontProps} />, 2);
55-
});
5647
});

0 commit comments

Comments
 (0)