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:
Evy Kassirer
2023-12-14 14:51:33 -08:00
committed by GitHub
parent 11dff6b4d8
commit 6e902defba
53 changed files with 223 additions and 265 deletions

View File

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