Skip to content

Commit 6c97ea7

Browse files
committed
refactor(test): ✅ update to set date utc correctly
1 parent 2de613d commit 6c97ea7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/utils/common.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { tz } from 'moment-timezone';
1+
import { utc } from 'moment-timezone';
22
import { HashAlgorithm, VnpLocale } from '../../src/enums';
33
import {
44
dateFormat,
@@ -14,8 +14,7 @@ import {
1414
describe('Common utils', () => {
1515
let utcDate: Date;
1616
beforeAll(() => {
17-
// utcDate = new Date(Date.UTC(2023, 11, 21, 10, 30, 0));
18-
utcDate = tz(new Date(Date.UTC(2023, 11, 21, 10, 30, 0)), 'utc').toDate();
17+
utcDate = utc('2023-12-21T10:30:00Z').toDate();
1918
});
2019

2120
describe('getDateInGMT7', () => {

0 commit comments

Comments
 (0)