mirror of https://github.com/zulip/zulip.git
js: Add "use strict" directive to CommonJS files.
ES and TypeScript modules are strict by default and don’t need this directive. ESLint will remind us to add it to new CommonJS files and remove it from ES and TypeScript modules. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
39c3a02736
commit
6ec808b8df
|
@ -7,7 +7,7 @@
|
||||||
"parser": "babel-eslint",
|
"parser": "babel-eslint",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"warnOnUnsupportedTypeScriptVersion": false,
|
"warnOnUnsupportedTypeScriptVersion": false,
|
||||||
"sourceType": "module"
|
"sourceType": "unambiguous"
|
||||||
},
|
},
|
||||||
"plugins": ["eslint-plugin-empty-returns"],
|
"plugins": ["eslint-plugin-empty-returns"],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
@ -29,6 +29,7 @@
|
||||||
"newlines-between": "always"
|
"newlines-between": "always"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"import/unambiguous": "error",
|
||||||
"new-cap": [
|
"new-cap": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
|
@ -88,7 +89,7 @@
|
||||||
],
|
],
|
||||||
"radix": "error",
|
"radix": "error",
|
||||||
"spaced-comment": "off",
|
"spaced-comment": "off",
|
||||||
"strict": "off",
|
"strict": "error",
|
||||||
"valid-typeof": ["error", {"requireStringLiterals": true}],
|
"valid-typeof": ["error", {"requireStringLiterals": true}],
|
||||||
"yoda": "error"
|
"yoda": "error"
|
||||||
},
|
},
|
||||||
|
@ -331,6 +332,12 @@
|
||||||
"@typescript-eslint/unified-signatures": "error"
|
"@typescript-eslint/unified-signatures": "error"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"files": ["**/*.d.ts"],
|
||||||
|
"rules": {
|
||||||
|
"import/unambiguous": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"files": ["frontend_tests/**"],
|
"files": ["frontend_tests/**"],
|
||||||
"globals": {
|
"globals": {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var util = require("util");
|
var util = require("util");
|
||||||
|
|
||||||
var test_credentials = require("../../var/casper/test_credentials.js").test_credentials;
|
var test_credentials = require("../../var/casper/test_credentials.js").test_credentials;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
/* eslint-env browser */
|
/* eslint-env browser */
|
||||||
|
|
||||||
// PhantomJS doesn’t support new DOMParser().parseFromString(…, "text/html").
|
// PhantomJS doesn’t support new DOMParser().parseFromString(…, "text/html").
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
var email = "alice@test.example.com";
|
var email = "alice@test.example.com";
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
var realm_url = "http://zulip.zulipdev.com:9981/";
|
var realm_url = "http://zulip.zulipdev.com:9981/";
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
/* Script for testing the web client.
|
/* Script for testing the web client.
|
||||||
|
|
||||||
This runs under CasperJS. It's an end-to-end black-box sort of test. It
|
This runs under CasperJS. It's an end-to-end black-box sort of test. It
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
common.start_and_log_in();
|
common.start_and_log_in();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
common.start_and_log_in();
|
common.start_and_log_in();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
function stream_checkbox(stream_name) {
|
function stream_checkbox(stream_name) {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var test_credentials = require("../../var/casper/test_credentials.js").test_credentials;
|
var test_credentials = require("../../var/casper/test_credentials.js").test_credentials;
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
function star_count() {
|
function star_count() {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
casper.options.verbose = true;
|
casper.options.verbose = true;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
// Test basic tab navigation.
|
// Test basic tab navigation.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
common.start_and_log_in();
|
common.start_and_log_in();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
common.start_and_log_in();
|
common.start_and_log_in();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
common.start_and_log_in();
|
common.start_and_log_in();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
function user_row(name) {
|
function user_row(name) {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
function waitWhileDraftsVisible(then) {
|
function waitWhileDraftsVisible(then) {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
common.start_and_log_in();
|
common.start_and_log_in();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
common.start_and_log_in();
|
common.start_and_log_in();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var common = require("../casper_lib/common.js");
|
var common = require("../casper_lib/common.js");
|
||||||
|
|
||||||
common.start_and_log_in();
|
common.start_and_log_in();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
const window_stub = $.create("window-stub");
|
const window_stub = $.create("window-stub");
|
||||||
set_global("to_$", () => window_stub);
|
set_global("to_$", () => window_stub);
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
alert_words: ["alertone", "alerttwo", "alertthree", "al*rt.*s", ".+", "emoji"],
|
alert_words: ["alertone", "alerttwo", "alertthree", "al*rt.*s", ".+", "emoji"],
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
||||||
set_global("channel", {});
|
set_global("channel", {});
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const noop = () => {};
|
const noop = () => {};
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
const JQuery = require("jquery");
|
const JQuery = require("jquery");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const blueslip_stacktrace = zrequire("blueslip_stacktrace");
|
const blueslip_stacktrace = zrequire("blueslip_stacktrace");
|
||||||
|
|
||||||
run_test("clean_path", () => {
|
run_test("clean_path", () => {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const _settings_bots = {
|
const _settings_bots = {
|
||||||
render_bots: () => {},
|
render_bots: () => {},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const _ = require("lodash");
|
const _ = require("lodash");
|
||||||
|
|
||||||
const _page_params = {};
|
const _page_params = {};
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const _ = require("lodash");
|
const _ = require("lodash");
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const _ = require("lodash");
|
const _ = require("lodash");
|
||||||
|
|
||||||
set_global("$", {});
|
set_global("$", {});
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("color_data");
|
zrequire("color_data");
|
||||||
|
|
||||||
run_test("pick_color", () => {
|
run_test("pick_color", () => {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("colorspace");
|
zrequire("colorspace");
|
||||||
|
|
||||||
run_test("sRGB_to_linear", () => {
|
run_test("sRGB_to_linear", () => {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const noop = () => {};
|
const noop = () => {};
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const _ = require("lodash");
|
const _ = require("lodash");
|
||||||
|
|
||||||
zrequire("keydown_util");
|
zrequire("keydown_util");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const {JSDOM} = require("jsdom");
|
const {JSDOM} = require("jsdom");
|
||||||
const rewiremock = require("rewiremock/node");
|
const rewiremock = require("rewiremock/node");
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const noop = function () {};
|
const noop = function () {};
|
||||||
const return_false = function () {
|
const return_false = function () {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("stream_data");
|
zrequire("stream_data");
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
zrequire("compose_fade");
|
zrequire("compose_fade");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
||||||
const _people = {
|
const _people = {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("compose_ui");
|
zrequire("compose_ui");
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
zrequire("user_status");
|
zrequire("user_status");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const emoji = zrequire("emoji", "shared/js/emoji");
|
const emoji = zrequire("emoji", "shared/js/emoji");
|
||||||
const typeahead = zrequire("typeahead", "shared/js/typeahead");
|
const typeahead = zrequire("typeahead", "shared/js/typeahead");
|
||||||
zrequire("compose_state");
|
zrequire("compose_state");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
global.stub_out_jquery();
|
global.stub_out_jquery();
|
||||||
|
|
||||||
set_global("page_params", {
|
set_global("page_params", {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const noop = function () {};
|
const noop = function () {};
|
||||||
|
|
||||||
const events = require("./lib/events.js");
|
const events = require("./lib/events.js");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const events = require("./lib/events.js");
|
const events = require("./lib/events.js");
|
||||||
|
|
||||||
const event_fixtures = events.fixtures;
|
const event_fixtures = events.fixtures;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const XDate = require("xdate");
|
const XDate = require("xdate");
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("dropdown_list_widget");
|
zrequire("dropdown_list_widget");
|
||||||
zrequire("scroll_util");
|
zrequire("scroll_util");
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
set_global("markdown", {});
|
set_global("markdown", {});
|
||||||
set_global("local_message", {
|
set_global("local_message", {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const emoji_codes = zrequire("emoji_codes", "generated/emoji/emoji_codes.json");
|
const emoji_codes = zrequire("emoji_codes", "generated/emoji/emoji_codes.json");
|
||||||
|
|
||||||
const events = require("./lib/events.js");
|
const events = require("./lib/events.js");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const _ = require("lodash");
|
const _ = require("lodash");
|
||||||
|
|
||||||
const emoji = zrequire("emoji", "shared/js/emoji");
|
const emoji = zrequire("emoji", "shared/js/emoji");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const fenced_code = zrequire("fenced_code", "shared/js/fenced_code");
|
const fenced_code = zrequire("fenced_code", "shared/js/fenced_code");
|
||||||
|
|
||||||
run_test("get_unused_fence", () => {
|
run_test("get_unused_fence", () => {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const FetchStatus = zrequire("fetch_status");
|
const FetchStatus = zrequire("fetch_status");
|
||||||
set_global("message_scroll", {
|
set_global("message_scroll", {
|
||||||
hide_loading_older: () => {},
|
hide_loading_older: () => {},
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("unread");
|
zrequire("unread");
|
||||||
zrequire("stream_data");
|
zrequire("stream_data");
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const FoldDict = zrequire("fold_dict").FoldDict;
|
const FoldDict = zrequire("fold_dict").FoldDict;
|
||||||
|
|
||||||
run_test("basic", () => {
|
run_test("basic", () => {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
// This is a general tour of how to write node tests that
|
// This is a general tour of how to write node tests that
|
||||||
// may also give you some quick insight on how the Zulip
|
// may also give you some quick insight on how the Zulip
|
||||||
// browser app is constructed. Let's start with testing
|
// browser app is constructed. Let's start with testing
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("hash_util");
|
zrequire("hash_util");
|
||||||
zrequire("stream_data");
|
zrequire("stream_data");
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
const window_stub = $.create("window-stub");
|
const window_stub = $.create("window-stub");
|
||||||
set_global("location", {
|
set_global("location", {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
// Important note on these tests:
|
// Important note on these tests:
|
||||||
//
|
//
|
||||||
// The way the Zulip hotkey tests work is as follows. First, we set
|
// The way the Zulip hotkey tests work is as follows. First, we set
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("templates");
|
zrequire("templates");
|
||||||
|
|
||||||
// We download our translations in `page_params` (which
|
// We download our translations in `page_params` (which
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
zrequire("input_pill");
|
zrequire("input_pill");
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
||||||
zrequire("keydown_util");
|
zrequire("keydown_util");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const LazySet = zrequire("lazy_set").LazySet;
|
const LazySet = zrequire("lazy_set").LazySet;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
// TODO: These events are not guaranteed to be perfectly
|
// TODO: These events are not guaranteed to be perfectly
|
||||||
// representative of what the server sends. For
|
// representative of what the server sends. For
|
||||||
// now we just want very basic test coverage. We
|
// now we just want very basic test coverage. We
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("rows");
|
zrequire("rows");
|
||||||
zrequire("lightbox");
|
zrequire("lightbox");
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("list_cursor");
|
zrequire("list_cursor");
|
||||||
|
|
||||||
run_test("config errors", () => {
|
run_test("config errors", () => {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("list_render");
|
zrequire("list_render");
|
||||||
|
|
||||||
// We need these stubs to get by instanceof checks.
|
// We need these stubs to get by instanceof checks.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("hash_util");
|
zrequire("hash_util");
|
||||||
|
|
||||||
const emoji = zrequire("emoji", "shared/js/emoji");
|
const emoji = zrequire("emoji", "shared/js/emoji");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This whole module is dedicated to adding
|
This whole module is dedicated to adding
|
||||||
one line of coverage for markdown.js.
|
one line of coverage for markdown.js.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("document", null);
|
set_global("document", null);
|
||||||
set_global("page_params", {
|
set_global("page_params", {
|
||||||
realm_community_topic_editing_limit_seconds: 86400,
|
realm_community_topic_editing_limit_seconds: 86400,
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("message_events");
|
zrequire("message_events");
|
||||||
zrequire("message_store");
|
zrequire("message_store");
|
||||||
zrequire("muting");
|
zrequire("muting");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const _ = require("lodash");
|
const _ = require("lodash");
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("unread");
|
zrequire("unread");
|
||||||
zrequire("unread_ops");
|
zrequire("unread_ops");
|
||||||
zrequire("message_flags");
|
zrequire("message_flags");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
// These unit tests for static/js/message_list.js emphasize the model-ish
|
// 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
|
// aspects of the MessageList class. We have to stub out a few functions
|
||||||
// related to views and events to get the tests working.
|
// related to views and events to get the tests working.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("unread");
|
zrequire("unread");
|
||||||
|
|
||||||
zrequire("Filter", "js/filter");
|
zrequire("Filter", "js/filter");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const _ = require("lodash");
|
const _ = require("lodash");
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const util = zrequire("util");
|
const util = zrequire("util");
|
||||||
zrequire("pm_conversations");
|
zrequire("pm_conversations");
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("timerender");
|
zrequire("timerender");
|
||||||
zrequire("muting");
|
zrequire("muting");
|
||||||
zrequire("stream_data");
|
zrequire("stream_data");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
zrequire("hash_util");
|
zrequire("hash_util");
|
||||||
zrequire("hashchange");
|
zrequire("hashchange");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const util = zrequire("util");
|
const util = zrequire("util");
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("Filter", "js/filter");
|
zrequire("Filter", "js/filter");
|
||||||
zrequire("FetchStatus", "js/fetch_status");
|
zrequire("FetchStatus", "js/fetch_status");
|
||||||
zrequire("MessageListData", "js/message_list_data");
|
zrequire("MessageListData", "js/message_list_data");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
zrequire("Filter", "js/filter");
|
zrequire("Filter", "js/filter");
|
||||||
zrequire("stream_data");
|
zrequire("stream_data");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("Filter", "js/filter");
|
zrequire("Filter", "js/filter");
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
zrequire("stream_data");
|
zrequire("stream_data");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
// Dependencies
|
// Dependencies
|
||||||
set_global(
|
set_global(
|
||||||
"$",
|
"$",
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("zxcvbn", zrequire("zxcvbn", "zxcvbn"));
|
set_global("zxcvbn", zrequire("zxcvbn", "zxcvbn"));
|
||||||
zrequire("common");
|
zrequire("common");
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const _ = require("lodash");
|
const _ = require("lodash");
|
||||||
const moment = require("moment-timezone");
|
const moment = require("moment-timezone");
|
||||||
const rewiremock = require("rewiremock/node");
|
const rewiremock = require("rewiremock/node");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
|
|
||||||
const return_false = function () {
|
const return_false = function () {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const pmc = zrequire("pm_conversations");
|
const pmc = zrequire("pm_conversations");
|
||||||
|
|
||||||
run_test("partners", () => {
|
run_test("partners", () => {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
||||||
set_global("narrow_state", {});
|
set_global("narrow_state", {});
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("poll_widget");
|
zrequire("poll_widget");
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const rewiremock = require("rewiremock/node");
|
const rewiremock = require("rewiremock/node");
|
||||||
|
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const XDate = require("xdate");
|
const XDate = require("xdate");
|
||||||
|
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("document", "document-stub");
|
set_global("document", "document-stub");
|
||||||
set_global("$", global.make_zjquery());
|
set_global("$", global.make_zjquery());
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const rs = zrequire("recent_senders");
|
const rs = zrequire("recent_senders");
|
||||||
|
|
||||||
let next_id = 0;
|
let next_id = 0;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("message_util");
|
zrequire("message_util");
|
||||||
|
|
||||||
const noop = () => {};
|
const noop = () => {};
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const rm = zrequire("rendered_markdown");
|
const rm = zrequire("rendered_markdown");
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
zrequire("user_groups");
|
zrequire("user_groups");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const rtl = zrequire("rtl");
|
const rtl = zrequire("rtl");
|
||||||
|
|
||||||
run_test("get_direction", () => {
|
run_test("get_direction", () => {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("schema");
|
zrequire("schema");
|
||||||
|
|
||||||
run_test("basics", () => {
|
run_test("basics", () => {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
zrequire("scroll_util");
|
zrequire("scroll_util");
|
||||||
set_global("ui", {
|
set_global("ui", {
|
||||||
get_scroll_element: (element) => element,
|
get_scroll_element: (element) => element,
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("page_params", {
|
set_global("page_params", {
|
||||||
search_pills_enabled: true,
|
search_pills_enabled: true,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
set_global("page_params", {
|
set_global("page_params", {
|
||||||
search_pills_enabled: false,
|
search_pills_enabled: false,
|
||||||
});
|
});
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue