Merge "fix: Fix unit test case"

This commit is contained in:
Zuul 2021-09-06 07:57:00 +00:00 committed by Gerrit Code Review
commit ca4f999c7f

View File

@ -141,8 +141,9 @@ describe('test utils index.js', () => {
expect(toLocalTimeFilter(1622025465 * 1000)).toBe( expect(toLocalTimeFilter(1622025465 * 1000)).toBe(
moment.unix(1622025465).format(timeFormatStr.YMDHms) moment.unix(1622025465).format(timeFormatStr.YMDHms)
); );
expect(toLocalTimeFilter(moment().utc().format())).toBe( const now = moment();
moment().format(timeFormatStr.YMDHms) expect(toLocalTimeFilter(now.clone().utc().format())).toBe(
now.clone().format(timeFormatStr.YMDHms)
); );
}); });