test: update test
parent
35ffd2b4a7
commit
9f7d24dd96
|
@ -2,6 +2,6 @@ import warning, { resetWarned } from '../vc-util/warning';
|
|||
|
||||
export { resetWarned };
|
||||
|
||||
export default (valid, component, message) => {
|
||||
export default (valid, component, message = '') => {
|
||||
warning(valid, `[antdv: ${component}] ${message}`);
|
||||
};
|
||||
|
|
|
@ -298,7 +298,7 @@ describe('Cascader', () => {
|
|||
expect($$('.ant-cascader-menu-item').length).toBe(2);
|
||||
}, 0);
|
||||
expect(errorSpy).toBeCalledWith(
|
||||
"Warning: 'limit' of showSearch in Cascader should be positive number or false.",
|
||||
"Warning: [antdv: Cascader] 'limit' of showSearch in Cascader should be positive number or false.",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -328,6 +328,7 @@ const Cascader = {
|
|||
} else {
|
||||
warning(
|
||||
typeof limit !== 'number',
|
||||
'Cascader',
|
||||
"'limit' of showSearch in Cascader should be positive number or false.",
|
||||
);
|
||||
filtered = flattenOptions.filter(path => filter(inputValue, path, names));
|
||||
|
|
|
@ -92,7 +92,7 @@ describe('Descriptions', () => {
|
|||
},
|
||||
});
|
||||
expect(errorSpy).toHaveBeenCalledWith(
|
||||
'Warning: [ant-design-vue: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
|
||||
'Warning: [antdv: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -87,7 +87,8 @@ const generateChildrenRows = (children, column) => {
|
|||
|
||||
warning(
|
||||
leftSpans === 0 && lastSpanSame,
|
||||
'[ant-design-vue: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
|
||||
'Descriptions',
|
||||
'Sum of column `span` in a line exceeds `column` of Descriptions.',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -60,7 +60,7 @@ export default {
|
|||
|
||||
beforeDestroy() {
|
||||
if (this.resizeObserver) {
|
||||
this.resizeObserver.remove();
|
||||
this.resizeObserver.disconnect();
|
||||
}
|
||||
if (this.debouncedResize && this.debouncedResize.cancel) {
|
||||
this.debouncedResize.cancel();
|
||||
|
|
Loading…
Reference in New Issue