test(Calendar): add test cases

This commit is contained in:
陈嘉涵
2019-12-26 19:59:08 +08:00
committed by neverland
parent 87ecdf9425
commit dec732daac
9 changed files with 790 additions and 10 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
import { createNamespace } from '../utils';
import { padZero } from '../utils/format/string';
const [createComponent, bem, t] = createNamespace('calendar');
@@ -8,7 +7,7 @@ export { createComponent, bem, t };
export const ROW_HEIGHT = 64;
export function formatMonthTitle(date: Date) {
return t('monthTitle', date.getFullYear(), padZero(date.getMonth() + 1));
return t('monthTitle', date.getFullYear(), date.getMonth() + 1);
}
export function compareMonth(date1: Date, date2: Date) {