Skip to content

Commit 737e1b8

Browse files
authored
Address unit test warnings (#2911)
1 parent 8f9df8d commit 737e1b8

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

packages/circuit-ui/components/DateInput/components/DateSegment.spec.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ describe('DateSegment', () => {
2828
min: 1,
2929
max: 12,
3030
step: 3,
31-
advanceFocusBoundary: 1,
3231
onChange: vi.fn(),
3332
focus: {
3433
previous: vi.fn(),

packages/circuit-ui/components/Table/Table.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ export class Table extends Component<TableProps, TableState> {
222222
scrollable = false,
223223
onRowClick,
224224
rows: initialRows,
225+
initialSortedColumn,
226+
initialSortDirection,
225227
onSortBy,
226228
className,
227229
...props

packages/circuit-ui/components/Tabs/Tabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class Tabs extends Component<TabsProps, TabsState> {
8585
};
8686

8787
render() {
88-
const { items, ...props } = this.props;
88+
const { items, initialSelectedIndex, ...props } = this.props;
8989
const { selectedIndex } = this.state;
9090
const { tabs, panels } = items.reduce(
9191
(aggr, { id, tab, panel }, index) => {

packages/circuit-ui/setupTests.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ global.matchMedia = vi.fn().mockImplementation((query) => ({
4747
removeEventListener: vi.fn(),
4848
dispatchEvent: vi.fn(),
4949
}));
50+
51+
global.scrollTo = vi.fn();

packages/circuit-ui/vendor/dialog-polyfill/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ if (typeof window === 'undefined') {
621621
* @param {!Element} element to force upgrade
622622
*/
623623
dialogPolyfill.forceRegisterDialog = function (element) {
624-
if (window.HTMLDialogElement || element.showModal) {
624+
if ((window.HTMLDialogElement && window.HTMLDialogElement.prototype.showModal) || element.showModal) {
625625
console.warn(
626626
'This browser already supports <dialog>, the polyfill ' +
627627
'may not work correctly',

0 commit comments

Comments
 (0)