Skip to content

Commit

Permalink
修改测试用例,符合季度测试
Browse files Browse the repository at this point in the history
  • Loading branch information
shanchao.wsc committed Oct 16, 2017
1 parent ad82afd commit 73b347d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Formatter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ describe('Formatter.date', () => {
expect(Formatter.date(date, 'MM-DD')).to.be(`${date.getMonth() < 9 ? `0${date.getMonth() + 1}` : date.getMonth() + 1}-${date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()}`);
expect(Formatter.date(date, 'DD')).to.be(`${date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()}`);
expect(Formatter.date(date, 'MM-dd')).to.be(`${date.getMonth() < 9 ? `0${date.getMonth() + 1}` : date.getMonth() + 1}-${date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()}`);
expect(Formatter.date(date, 'QQ')).to.be(`${Math.floor(date.getMonth() + 3 / 3)}`.padStart(2, '0'));
expect(Formatter.date(date, 'qq')).to.be(`${Math.floor(date.getMonth() + 3 / 3)}`.padStart(2, '0'));
expect(Formatter.date(date, 'QQ')).to.be(`${Math.floor(date.getMonth() / 3) + 1}`.padStart(2, '0'));
expect(Formatter.date(date, 'qq')).to.be(`${Math.floor(date.getMonth() / 3) + 1}`.padStart(2, '0'));
expect(Formatter.date(date, 'hh:mm:ss S')).to.be(`${`${date.getHours()}`.padStart(2, '0')}:${`${date.getMinutes()}`.padStart(2, '0')}:${`${date.getSeconds()}`.padStart(2, '0')} ${`${date.getMilliseconds()}`.padStart(3, '0')}`);
});
});
Expand Down

0 comments on commit 73b347d

Please sign in to comment.