mirror of https://github.com/zulip/zulip.git
composebox_typeahead tests: Use zrequire for compose_ui.
This commit is contained in:
parent
53d8abe79b
commit
763dfbdcfb
|
@ -26,11 +26,6 @@ const stream_topic_history_util = mock_esm("../../static/js/stream_topic_history
|
|||
|
||||
let autosize_called;
|
||||
|
||||
mock_esm("../../static/js/compose_ui", {
|
||||
autosize_textarea() {
|
||||
autosize_called = true;
|
||||
},
|
||||
});
|
||||
let set_timeout_called;
|
||||
set_global("setTimeout", (f, time) => {
|
||||
f();
|
||||
|
@ -48,6 +43,7 @@ const people = zrequire("people");
|
|||
const user_groups = zrequire("user_groups");
|
||||
const stream_data = zrequire("stream_data");
|
||||
const compose_pm_pill = zrequire("compose_pm_pill");
|
||||
const compose_ui = zrequire("compose_ui");
|
||||
const composebox_typeahead = zrequire("composebox_typeahead");
|
||||
const settings_config = zrequire("settings_config");
|
||||
const pygments_data = zrequire("../generated/pygments_data.json");
|
||||
|
@ -382,6 +378,10 @@ test("topics_seen_for", ({override}) => {
|
|||
});
|
||||
|
||||
test("content_typeahead_selected", ({override}) => {
|
||||
compose_ui.autosize_textarea = () => {
|
||||
autosize_called = true;
|
||||
};
|
||||
|
||||
const fake_this = {
|
||||
query: "",
|
||||
$element: {},
|
||||
|
|
Loading…
Reference in New Issue