mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 19:06:09 +00:00
node tests: Use noop helper function pattern in test files.
Some files already were using `noop` in place of `() => {}`.
It's both clearer what it means and is easier to type.
This updates all test files to fully use `noop`, and
adds a shared import from the test lib file.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
const {noop} = require("./test");
|
||||
const $ = require("./zjquery");
|
||||
|
||||
exports.mock_stream_header_colorblock = () => {
|
||||
const $stream_selection_dropdown = $("#compose_select_recipient_widget_wrapper");
|
||||
const $stream_header_colorblock = $(".stream_header_colorblock");
|
||||
$("#compose_select_recipient_widget_wrapper .stream_header_colorblock").css = () => {};
|
||||
$("#compose_select_recipient_widget_wrapper .stream_header_colorblock").css = noop;
|
||||
$stream_selection_dropdown.set_find_results(
|
||||
".stream_header_colorblock",
|
||||
$stream_header_colorblock,
|
||||
|
||||
Reference in New Issue
Block a user