node tests: Localize MockDate call.

This commit is contained in:
Steve Howell 2021-05-19 18:19:45 +00:00 committed by Steve Howell
parent b543116193
commit cc6310b57d
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,6 @@ document.location.protocol = "https:";
document.location.host = "foo.com"; document.location.host = "foo.com";
const fake_now = 555; const fake_now = 555;
MockDate.set(new Date(fake_now * 1000));
const channel = mock_esm("../../static/js/channel"); const channel = mock_esm("../../static/js/channel");
const compose_actions = mock_esm("../../static/js/compose_actions"); const compose_actions = mock_esm("../../static/js/compose_actions");
@ -388,6 +387,8 @@ test_ui("send_message_success", (override) => {
}); });
test_ui("send_message", (override) => { test_ui("send_message", (override) => {
MockDate.set(new Date(fake_now * 1000));
override(drafts, "delete_draft_after_send", () => {}); override(drafts, "delete_draft_after_send", () => {});
override(sent_messages, "start_tracking_message", () => {}); override(sent_messages, "start_tracking_message", () => {});