Skip to content

Commit acd4f9d

Browse files
committed
test: use utc as default timezone for test
1 parent d27e8ad commit acd4f9d

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"prettier": "^1.19.1",
6868
"raw-loader": "^4.0.0",
6969
"rimraf": "^3.0.0",
70+
"set-tz": "^0.2.0",
7071
"version-bump-prompt": "^5.0.6",
7172
"webpack": "^4.41.4",
7273
"webpack-cli": "^3.3.10",

test/stdlib.calendar.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require("set-tz")("UTC");
2+
13
const { createTestUtil } = require("./utils");
24

35
const { expectOutput } = createTestUtil({
@@ -10,14 +12,14 @@ describe("stdlib", () => {
1012
it("言彼之時刻", () => {
1113
expectOutput(
1214
"方悟「言彼之時刻」之義。施「言彼之時刻」於四千七百一十四",
13-
"巳初一刻三分三十四秒"
15+
"丑初一刻三分三十四秒"
1416
);
1517
});
1618

1719
it("言彼之日時", () => {
1820
expectOutput(
1921
"方悟「言彼之日時」之義。施「言彼之日時」於四千七百一十四",
20-
"西元一九六九年己酉年十一月二十四日辛巳日巳初一刻三分三十四秒"
22+
"西元一九六九年己酉年十一月二十四日辛巳日丑初一刻三分三十四秒"
2123
);
2224
});
2325
});

0 commit comments

Comments
 (0)