mirror of https://github.com/zulip/zulip.git
zjsunit: Deglobalize assert.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
a9ad69bfa4
commit
7b03d48798
|
@ -361,7 +361,6 @@
|
|||
{
|
||||
"files": ["frontend_tests/**"],
|
||||
"globals": {
|
||||
"assert": false,
|
||||
"document": false,
|
||||
"reset_module": false,
|
||||
"set_global": false,
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
const window_stub = $.create("window-stub");
|
||||
set_global("to_$", () => window_stub);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const params = {
|
||||
alert_words: ["alertone", "alerttwo", "alertthree", "al*rt.*s", ".+", "emoji"],
|
||||
};
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
||||
set_global("channel", {});
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
"use strict";
|
||||
|
||||
const noop = () => {};
|
||||
const {strict: assert} = require("assert");
|
||||
const fs = require("fs");
|
||||
|
||||
const {JSDOM} = require("jsdom");
|
||||
|
||||
const noop = () => {};
|
||||
const template = fs.readFileSync("templates/corporate/billing.html", "utf-8");
|
||||
const dom = new JSDOM(template, {pretendToBeVisual: true});
|
||||
const document = dom.window.document;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
const fs = require("fs");
|
||||
|
||||
const JQuery = require("jquery");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const blueslip_stacktrace = zrequire("blueslip_stacktrace");
|
||||
|
||||
run_test("clean_path", () => {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _settings_bots = {
|
||||
render_bots: () => {},
|
||||
};
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _ = require("lodash");
|
||||
|
||||
const _page_params = {};
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _ = require("lodash");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _ = require("lodash");
|
||||
|
||||
set_global("$", {});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("color_data");
|
||||
|
||||
run_test("pick_color", () => {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("colorspace");
|
||||
|
||||
run_test("sRGB_to_linear", () => {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const noop = () => {};
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _ = require("lodash");
|
||||
|
||||
zrequire("keydown_util");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const {JSDOM} = require("jsdom");
|
||||
const rewiremock = require("rewiremock/node");
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const noop = function () {};
|
||||
const return_false = function () {
|
||||
return false;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("stream_data");
|
||||
const people = zrequire("people");
|
||||
zrequire("compose_fade");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
||||
const people = zrequire("people");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const autosize = require("autosize");
|
||||
|
||||
zrequire("compose_ui");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const emoji = zrequire("emoji", "shared/js/emoji");
|
||||
const typeahead = zrequire("typeahead", "shared/js/typeahead");
|
||||
zrequire("compose_state");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
global.stub_out_jquery();
|
||||
|
||||
set_global("page_params", {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const noop = function () {};
|
||||
|
||||
const events = require("./lib/events");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const events = require("./lib/events");
|
||||
|
||||
const event_fixtures = events.fixtures;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const XDate = require("xdate");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("dropdown_list_widget");
|
||||
zrequire("scroll_util");
|
||||
set_global("$", global.make_zjquery());
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
set_global("markdown", {});
|
||||
set_global("local_message", {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const emoji_codes = zrequire("emoji_codes", "generated/emoji/emoji_codes.json");
|
||||
|
||||
const events = require("./lib/events");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _ = require("lodash");
|
||||
|
||||
const emoji = zrequire("emoji", "shared/js/emoji");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const fenced_code = zrequire("fenced_code", "shared/js/fenced_code");
|
||||
|
||||
run_test("get_unused_fence", () => {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const FetchStatus = zrequire("fetch_status");
|
||||
set_global("message_scroll", {
|
||||
hide_loading_older: () => {},
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("unread");
|
||||
zrequire("stream_data");
|
||||
const people = zrequire("people");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const {FoldDict} = zrequire("fold_dict");
|
||||
|
||||
run_test("basic", () => {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
// This is a general tour of how to write node tests that
|
||||
// may also give you some quick insight on how the Zulip
|
||||
// browser app is constructed. Let's start with testing
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("hash_util");
|
||||
zrequire("stream_data");
|
||||
const people = zrequire("people");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
const window_stub = $.create("window-stub");
|
||||
set_global("location", {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
// Important note on these tests:
|
||||
//
|
||||
// The way the Zulip hotkey tests work is as follows. First, we set
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("templates");
|
||||
|
||||
// We download our translations in `page_params` (which
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
zrequire("input_pill");
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const {LazySet} = zrequire("lazy_set");
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("rows");
|
||||
zrequire("lightbox");
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("list_cursor");
|
||||
|
||||
run_test("config errors", () => {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("list_render");
|
||||
|
||||
// We need these stubs to get by instanceof checks.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("hash_util");
|
||||
|
||||
const emoji = zrequire("emoji", "shared/js/emoji");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("document", null);
|
||||
set_global("page_params", {
|
||||
realm_community_topic_editing_limit_seconds: 86400,
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("message_events");
|
||||
zrequire("message_store");
|
||||
zrequire("muting");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _ = require("lodash");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("unread");
|
||||
zrequire("unread_ops");
|
||||
zrequire("message_flags");
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
// 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.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("unread");
|
||||
|
||||
zrequire("Filter", "js/filter");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _ = require("lodash");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const util = zrequire("util");
|
||||
zrequire("pm_conversations");
|
||||
const people = zrequire("people");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("timerender");
|
||||
zrequire("muting");
|
||||
zrequire("stream_data");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
zrequire("hash_util");
|
||||
zrequire("hashchange");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const util = zrequire("util");
|
||||
set_global("$", global.make_zjquery());
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("Filter", "js/filter");
|
||||
zrequire("FetchStatus", "js/fetch_status");
|
||||
zrequire("MessageListData", "js/message_list_data");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const people = zrequire("people");
|
||||
zrequire("Filter", "js/filter");
|
||||
zrequire("stream_data");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("Filter", "js/filter");
|
||||
const people = zrequire("people");
|
||||
zrequire("stream_data");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const rewiremock = require("rewiremock/node");
|
||||
|
||||
// Dependencies
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("zxcvbn", zrequire("zxcvbn", "zxcvbn"));
|
||||
zrequire("common");
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _ = require("lodash");
|
||||
const moment = require("moment-timezone");
|
||||
const rewiremock = require("rewiremock/node");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const people = zrequire("people");
|
||||
|
||||
const return_false = function () {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const pmc = zrequire("pm_conversations");
|
||||
|
||||
run_test("partners", () => {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
||||
set_global("narrow_state", {});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("poll_widget");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const rewiremock = require("rewiremock/node");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const XDate = require("xdate");
|
||||
|
||||
const people = zrequire("people");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("document", "document-stub");
|
||||
set_global("$", global.make_zjquery());
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const rs = zrequire("recent_senders");
|
||||
|
||||
let next_id = 0;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("message_util");
|
||||
|
||||
const noop = () => {};
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const rm = zrequire("rendered_markdown");
|
||||
const people = zrequire("people");
|
||||
zrequire("user_groups");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const rtl = zrequire("rtl");
|
||||
|
||||
run_test("get_direction", () => {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("schema");
|
||||
|
||||
run_test("basics", () => {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("scroll_util");
|
||||
set_global("ui", {
|
||||
get_scroll_element: (element) => element,
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("page_params", {
|
||||
search_pills_enabled: true,
|
||||
});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("page_params", {
|
||||
search_pills_enabled: false,
|
||||
});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("search_pill");
|
||||
zrequire("input_pill");
|
||||
zrequire("Filter", "js/filter");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("page_params", {
|
||||
search_pills_enabled: true,
|
||||
});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("page_params", {
|
||||
search_pills_enabled: false,
|
||||
});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const noop = function () {};
|
||||
|
||||
set_global("document", {});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const rewiremock = require("rewiremock/node");
|
||||
|
||||
set_global("page_params", {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const settings_data = zrequire("settings_data");
|
||||
const settings_config = zrequire("settings_config");
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
set_global("upload_widget", {});
|
||||
zrequire("settings_emoji");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
set_global("XDate", zrequire("XDate", "xdate"));
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const rewiremock = require("rewiremock/node");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const rewiremock = require("rewiremock/node");
|
||||
|
||||
set_global("page_params", {});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _ = require("lodash");
|
||||
|
||||
zrequire("user_pill");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
zrequire("spoilers");
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const _ = require("lodash");
|
||||
|
||||
set_global("page_params", {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const {LazySet} = zrequire("lazy_set");
|
||||
|
||||
const noop = () => {};
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const noop = function () {};
|
||||
const return_true = function () {
|
||||
return true;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
set_global("document", "document-stub");
|
||||
set_global("$", global.make_zjquery());
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("stream_data");
|
||||
zrequire("stream_pill");
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
// This tests the stream searching functionality which currently
|
||||
// lives in stream_list.js.
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("stream_data");
|
||||
zrequire("stream_sort");
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("unread");
|
||||
zrequire("stream_data");
|
||||
zrequire("stream_topic_history");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
zrequire("submessage");
|
||||
|
||||
set_global("channel", {});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
global.stub_out_jquery();
|
||||
|
||||
set_global("ui", {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
const fs = require("fs");
|
||||
|
||||
const {JSDOM} = require("jsdom");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const moment = require("moment");
|
||||
const XDate = require("xdate");
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue