mirror of https://github.com/zulip/zulip.git
zjsunit: Deglobalize run_test.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
22166e8ea9
commit
21d432e12c
|
@ -228,7 +228,6 @@
|
|||
"resize": false,
|
||||
"rows": false,
|
||||
"rtl": false,
|
||||
"run_test": false,
|
||||
"schema": false,
|
||||
"scroll_bar": false,
|
||||
"scroll_util": false,
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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 = () => {};
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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: () => {},
|
||||
|
|
|
@ -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 = {};
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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("$", {});
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
zrequire("color_data");
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
zrequire("colorspace");
|
||||
|
||||
|
|
|
@ -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 = () => {};
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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 () {};
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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 () {};
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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", {
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {set_global, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
zrequire("templates");
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
zrequire("list_cursor");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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", {
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {set_global, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
zrequire("unread");
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
const rtl = zrequire("rtl");
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
zrequire("schema");
|
||||
|
||||
|
|
|
@ -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", {
|
||||
|
|
|
@ -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", {
|
||||
|
|
|
@ -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", {
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 () {};
|
||||
|
||||
|
|
|
@ -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", {
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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", {});
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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 () {};
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {set_global, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
zrequire("submessage");
|
||||
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue