zjsunit: Lift restriction against mocking third party modules.

Use fully resolvable request paths because we need to be able to refer
to third party modules, and to increase uniformity and explicitness.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-03-09 21:10:32 -08:00
parent 87a3650176
commit 876806eb4d
76 changed files with 436 additions and 442 deletions

View File

@@ -3,11 +3,11 @@
const {strict: assert} = require("assert");
const {stub_templates} = require("../zjsunit/handlebars");
const {mock_module, zrequire} = require("../zjsunit/namespace");
const {mock_esm, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const $ = require("../zjsunit/zjquery");
const channel = mock_module("channel");
const channel = mock_esm("../../static/js/channel");
const alert_words = zrequire("alert_words");
const alert_words_ui = zrequire("alert_words_ui");