Skip to content

Commit a77bcda

Browse files
authored
Removing react testing library from peer dependency (#28808)
* Removing react testing library from peer dependency * Adding change file * Adding as a dev dependency * Renaming test utility file
1 parent f9f2b69 commit a77bcda

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Removing react testing library from peer dependency",
4+
"packageName": "@fluentui/react-charting",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/react-charting/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
},
6666
"peerDependencies": {
6767
"@fluentui/react": "^8.110.13",
68-
"@testing-library/react": "12.1.2",
6968
"@types/react": ">=16.8.0 <19.0.0",
7069
"@types/react-dom": ">=16.8.0 <19.0.0",
7170
"react": ">=16.8.0 <19.0.0",

packages/react-charting/src/components/StackedBarChart/StackedBarChartRTL.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
testScreenResolutionChanges,
88
testWithWait,
99
testWithoutWait,
10-
} from '../../utilities/TestUtility';
10+
} from '../../utilities/TestUtility.test';
1111
import { StackedBarChart } from './StackedBarChart';
1212
import { DefaultPalette, ThemeProvider } from '@fluentui/react';
1313
import { fireEvent, render, screen, waitFor } from '@testing-library/react';

packages/react-charting/src/components/VerticalBarChart/VerticalBarChartRTL.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
testScreenResolutionChanges,
1414
testWithWait,
1515
testWithoutWait,
16-
} from '../../utilities/TestUtility';
16+
} from '../../utilities/TestUtility.test';
1717
import { IVerticalBarChartProps } from './VerticalBarChart.types';
1818

1919
const pointsWithLine = [

packages/react-charting/src/utilities/TestUtility.tsx renamed to packages/react-charting/src/utilities/TestUtility.test.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,8 @@ export const testScreenResolutionChanges = (testFunction: () => void) => {
6363
});
6464
});
6565
};
66+
67+
it('getById and getByClass should be defined', () => {
68+
expect(getById).toBeDefined();
69+
expect(getByClass).toBeDefined();
70+
});

0 commit comments

Comments
 (0)