mirror of https://github.com/zulip/zulip.git
node tests: Avoid zjquery for channel tests.
We create our own stub for $.ajax.
This commit is contained in:
parent
0ffbea8650
commit
623500bae1
|
@ -6,7 +6,6 @@ const _ = require("lodash");
|
||||||
|
|
||||||
const {set_global, zrequire} = require("../zjsunit/namespace");
|
const {set_global, zrequire} = require("../zjsunit/namespace");
|
||||||
const {run_test} = require("../zjsunit/test");
|
const {run_test} = require("../zjsunit/test");
|
||||||
const $ = require("../zjsunit/zjquery");
|
|
||||||
|
|
||||||
const reload = set_global("reload", {});
|
const reload = set_global("reload", {});
|
||||||
zrequire("reload_state");
|
zrequire("reload_state");
|
||||||
|
@ -14,6 +13,8 @@ const channel = zrequire("channel");
|
||||||
|
|
||||||
const default_stub_xhr = "default-stub-xhr";
|
const default_stub_xhr = "default-stub-xhr";
|
||||||
|
|
||||||
|
const $ = set_global("$", {});
|
||||||
|
|
||||||
function test_with_mock_ajax(test_params) {
|
function test_with_mock_ajax(test_params) {
|
||||||
const {xhr = default_stub_xhr, run_code, check_ajax_options} = test_params;
|
const {xhr = default_stub_xhr, run_code, check_ajax_options} = test_params;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue