Skip to content

Commit ed43eb8

Browse files
authored
add unit test for issue#504 (#506)
1 parent 7802420 commit ed43eb8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/issue-504-test.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"use strict";
2+
3+
const { FakeTimers, assert } = require("./helpers/setup-tests");
4+
5+
describe("issue #504", function () {
6+
it("should not mutate Date class", function () {
7+
const priorDate = new Date();
8+
assert.equals(priorDate instanceof Date, true);
9+
10+
const clock = FakeTimers.install();
11+
12+
const afterDate = new Date();
13+
assert.equals(priorDate instanceof Date, true);
14+
assert.equals(afterDate instanceof Date, true);
15+
16+
clock.uninstall();
17+
});
18+
});

0 commit comments

Comments
 (0)