mirror of https://github.com/zulip/zulip.git
node tutorial: Inline setup.
This code didn't make sense to run inside its own run_test wrapper.
This commit is contained in:
parent
118a212af8
commit
69ddf68f4d
|
@ -630,20 +630,6 @@ const social_stream = {
|
||||||
subscribed: true,
|
subscribed: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
run_test("set_up_filter", () => {
|
|
||||||
stream_data.add_sub(social_stream);
|
|
||||||
|
|
||||||
const filter_terms = [
|
|
||||||
{operator: "stream", operand: "Social"},
|
|
||||||
{operator: "topic", operand: "lunch"},
|
|
||||||
];
|
|
||||||
|
|
||||||
const filter = new Filter(filter_terms);
|
|
||||||
|
|
||||||
narrow_state.filter = () => filter;
|
|
||||||
narrow_state.active = () => true;
|
|
||||||
});
|
|
||||||
|
|
||||||
function jquery_elem() {
|
function jquery_elem() {
|
||||||
// We create basic stubs for jQuery elements, so they
|
// We create basic stubs for jQuery elements, so they
|
||||||
// just work. We can extend these in cases where we want
|
// just work. We can extend these in cases where we want
|
||||||
|
@ -748,7 +734,19 @@ function make_sidebar_helper() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
run_test("stream_list", () => {
|
run_test("stream_list", (override) => {
|
||||||
|
stream_data.add_sub(social_stream);
|
||||||
|
|
||||||
|
const filter_terms = [
|
||||||
|
{operator: "stream", operand: "Social"},
|
||||||
|
{operator: "topic", operand: "lunch"},
|
||||||
|
];
|
||||||
|
|
||||||
|
const filter = new Filter(filter_terms);
|
||||||
|
|
||||||
|
override(narrow_state, "filter", () => filter);
|
||||||
|
override(narrow_state, "active", () => true);
|
||||||
|
|
||||||
const jquery_helper = make_jquery_helper();
|
const jquery_helper = make_jquery_helper();
|
||||||
const sidebar_helper = make_sidebar_helper();
|
const sidebar_helper = make_sidebar_helper();
|
||||||
const topic_list_helper = make_topic_list_helper();
|
const topic_list_helper = make_topic_list_helper();
|
||||||
|
|
Loading…
Reference in New Issue