Skip to content

Commit 9f7d24d

Browse files
committed
test: update test
1 parent 35ffd2b commit 9f7d24d

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

components/_util/warning.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import warning, { resetWarned } from '../vc-util/warning';
22

33
export { resetWarned };
44

5-
export default (valid, component, message) => {
5+
export default (valid, component, message = '') => {
66
warning(valid, `[antdv: ${component}] ${message}`);
77
};

components/cascader/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ describe('Cascader', () => {
298298
expect($$('.ant-cascader-menu-item').length).toBe(2);
299299
}, 0);
300300
expect(errorSpy).toBeCalledWith(
301-
"Warning: 'limit' of showSearch in Cascader should be positive number or false.",
301+
"Warning: [antdv: Cascader] 'limit' of showSearch in Cascader should be positive number or false.",
302302
);
303303
});
304304
});

components/cascader/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ const Cascader = {
328328
} else {
329329
warning(
330330
typeof limit !== 'number',
331+
'Cascader',
331332
"'limit' of showSearch in Cascader should be positive number or false.",
332333
);
333334
filtered = flattenOptions.filter(path => filter(inputValue, path, names));

components/descriptions/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ describe('Descriptions', () => {
9292
},
9393
});
9494
expect(errorSpy).toHaveBeenCalledWith(
95-
'Warning: [ant-design-vue: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
95+
'Warning: [antdv: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
9696
);
9797
});
9898

components/descriptions/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ const generateChildrenRows = (children, column) => {
8787

8888
warning(
8989
leftSpans === 0 && lastSpanSame,
90-
'[ant-design-vue: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
90+
'Descriptions',
91+
'Sum of column `span` in a line exceeds `column` of Descriptions.',
9192
);
9293
}
9394
});

components/vc-tabs/src/ScrollableTabBarNode.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default {
6060

6161
beforeDestroy() {
6262
if (this.resizeObserver) {
63-
this.resizeObserver.remove();
63+
this.resizeObserver.disconnect();
6464
}
6565
if (this.debouncedResize && this.debouncedResize.cancel) {
6666
this.debouncedResize.cancel();

0 commit comments

Comments
 (0)