node tests: Avoid zjquery for channel tests.

We create our own stub for $.ajax.
This commit is contained in:
Steve Howell 2021-02-22 11:18:39 +00:00 committed by Steve Howell
parent 0ffbea8650
commit 623500bae1
1 changed files with 2 additions and 1 deletions

View File

@ -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;