zjsunit: Deglobalize run_test.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-11-30 15:39:47 -08:00 committed by Steve Howell
parent 22166e8ea9
commit 21d432e12c
126 changed files with 157 additions and 19 deletions

View File

@ -228,7 +228,6 @@
"resize": false,
"rows": false,
"rtl": false,
"run_test": false,
"schema": false,
"scroll_bar": false,
"scroll_util": false,

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const params = {
alert_words: ["alertone", "alerttwo", "alertthree", "al*rt.*s", ".+", "emoji"],

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -6,6 +6,7 @@ const fs = require("fs");
const {JSDOM} = require("jsdom");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const noop = () => {};

View File

@ -7,6 +7,7 @@ const JQuery = require("jquery");
const {JSDOM} = require("jsdom");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const template = fs.readFileSync("templates/corporate/upgrade.html", "utf-8");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const blueslip_stacktrace = zrequire("blueslip_stacktrace");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const _settings_bots = {
render_bots: () => {},

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const _ = require("lodash");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const _page_params = {};

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const _ = require("lodash");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const _ = require("lodash");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
set_global("$", {});

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("color_data");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("colorspace");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const noop = () => {};

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const _ = require("lodash");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("keydown_util");
zrequire("components");

View File

@ -7,6 +7,7 @@ const rewiremock = require("rewiremock/node");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const events = require("./lib/events");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const noop = function () {};

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("stream_data");
const people = zrequire("people");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const autosize = require("autosize");
const {set_global, with_field, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
zrequire("compose_ui");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const emoji = zrequire("emoji", "shared/js/emoji");

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const {JSDOM} = require("jsdom");
const {set_global, stub_out_jquery, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
stub_out_jquery();

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {make_stub, with_stub} = require("../zjsunit/stub");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const noop = function () {};

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {make_stub, with_stub} = require("../zjsunit/stub");
const {run_test} = require("../zjsunit/test");
const events = require("./lib/events");

View File

@ -6,6 +6,7 @@ const XDate = require("xdate");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, with_field, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
zrequire("dropdown_list_widget");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const emoji_codes = zrequire("emoji_codes", "generated/emoji/emoji_codes.json");

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const _ = require("lodash");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const emoji = zrequire("emoji", "shared/js/emoji");
zrequire("emoji_picker");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const fenced_code = zrequire("fenced_code", "shared/js/fenced_code");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const FetchStatus = zrequire("fetch_status");
set_global("message_scroll", {

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, stub_out_jquery, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
zrequire("unread");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {FoldDict} = zrequire("fold_dict");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
// This is a general tour of how to write node tests that
// may also give you some quick insight on how the Zulip

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
zrequire("hash_util");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {set_global, with_overrides, zrequire} = require("../zjsunit/namespace");
const {with_stub} = require("../zjsunit/stub");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
// Important note on these tests:

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("templates");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -1,6 +1,7 @@
"use strict";
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {LazySet} = zrequire("lazy_set");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
zrequire("rows");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("list_cursor");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("list_render");

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const markdown_test_cases = require("../../zerver/tests/fixtures/markdown_test_cases.json");
const markdown_assert = require("../zjsunit/markdown_assert");
const {set_global, with_field, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
zrequire("hash_util");

View File

@ -10,6 +10,7 @@
const rewiremock = require("rewiremock/node");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const markdown_config = zrequire("markdown_config");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, stub_out_jquery, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
set_global("document", null);
set_global("page_params", {

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
zrequire("message_events");

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const _ = require("lodash");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("unread");
zrequire("unread_ops");

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {set_global, stub_out_jquery, zrequire} = require("../zjsunit/namespace");
const {with_stub} = require("../zjsunit/stub");
const {run_test} = require("../zjsunit/test");
// These unit tests for static/js/message_list.js emphasize the model-ish
// aspects of the MessageList class. We have to stub out a few functions
// related to views and events to get the tests working.

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("unread");

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const _ = require("lodash");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {with_stub} = require("../zjsunit/stub");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const util = zrequire("util");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("timerender");
zrequire("muting");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const util = zrequire("util");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("Filter", "js/filter");
zrequire("FetchStatus", "js/fetch_status");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const people = zrequire("people");
zrequire("Filter", "js/filter");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("Filter", "js/filter");
const people = zrequire("people");

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const rewiremock = require("rewiremock/node");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
// Dependencies

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
set_global("zxcvbn", zrequire("zxcvbn", "zxcvbn"));
zrequire("common");

View File

@ -7,6 +7,7 @@ const moment = require("moment-timezone");
const rewiremock = require("rewiremock/node");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const people = rewiremock.proxy(() => zrequire("people"), {
"moment-timezone": () => moment("20130208T080910"),

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const people = zrequire("people");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const pmc = zrequire("pm_conversations");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, with_field, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
zrequire("poll_widget");

View File

@ -6,6 +6,7 @@ const rewiremock = require("rewiremock/node");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const XDate = require("xdate");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const people = zrequire("people");
zrequire("presence");

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, with_field, zrequire} = require("../zjsunit/namespace");
const {with_stub} = require("../zjsunit/stub");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("document", "document-stub");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const rs = zrequire("recent_senders");

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {stub_templates} = require("../zjsunit/handlebars");
const {reset_module, set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
zrequire("message_util");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const rm = zrequire("rendered_markdown");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const rtl = zrequire("rtl");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("schema");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("scroll_util");
set_global("ui", {

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("page_params", {

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("page_params", {

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("search_pill");
zrequire("input_pill");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
set_global("page_params", {
search_pills_enabled: true,

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
set_global("page_params", {
search_pills_enabled: false,

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, stub_out_jquery, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const noop = function () {};

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const rewiremock = require("rewiremock/node");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("page_params", {

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const settings_data = zrequire("settings_data");
const settings_config = zrequire("settings_config");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -6,6 +6,7 @@ const rewiremock = require("rewiremock/node");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -6,6 +6,7 @@ const rewiremock = require("rewiremock/node");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("page_params", {});

View File

@ -6,6 +6,7 @@ const _ = require("lodash");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
zrequire("user_pill");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("$", make_zjquery());

View File

@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
const _ = require("lodash");
const {set_global, stub_out_jquery, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
set_global("page_params", {
is_admin: false,

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const {LazySet} = zrequire("lazy_set");

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {make_stub, with_stub} = require("../zjsunit/stub");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
const noop = function () {};

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
set_global("document", "document-stub");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("stream_data");
zrequire("stream_pill");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
// This tests the stream searching functionality which currently
// lives in stream_list.js.

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("stream_data");
zrequire("stream_sort");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("unread");
zrequire("stream_data");

View File

@ -3,6 +3,7 @@
const {strict: assert} = require("assert");
const {set_global, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
zrequire("submessage");

View File

@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
const {stub_templates} = require("../zjsunit/handlebars");
const {set_global, stub_out_jquery, zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {make_zjquery} = require("../zjsunit/zjquery");
stub_out_jquery();

Some files were not shown because too many files have changed in this diff Show More