Commit Graph

8 Commits

Author SHA1 Message Date
Anders Kaseorg eb2c822d3f eslint: Enable object-shorthand avoidExplicitReturnArrows option.
This is equivalent in the absence of ‘this’ (which ESLint knows to
check for).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-11-17 16:48:44 -08:00
Anders Kaseorg f84a2c08d5 js: Prefix jQuery object variable names with $.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-16 12:52:07 -07:00
Priyank Patel 968a8c4e50 js: Split out muted_users module from muting. 2021-06-30 16:32:55 -07:00
Steve Howell d5c4495fa5 zjsunit: Wire $ to zjquery by default.
I introduce `mock_jquery` for modules that
want their own mock implementation.
2021-06-16 12:55:53 -04:00
Steve Howell 9e657dd795 node tests: Use {override} in run_test. 2021-06-16 12:55:53 -04:00
Riken Shah f95c539122 custom_check: Avoid use of assert to avoid confusion with assert.equal.
This commit bans the use of `assert` and replaces it
with `assert.ok` to avoid confusion with `assert.equal`.

Fixes #18687.
2021-06-10 09:15:57 -07:00
Steve Howell b7a188fde8 node tests: Deepen filter_user_ids test.
We now test that activity.build_user_sidebar
integrates with the user_search code.
2021-05-18 18:34:17 -04:00
Steve Howell cd1510c0ef node tests: Extract user_search tests.
This is mostly moving tests from activity.js
into user_search.js, but it's not a verbatim
code move.

The new module continues to make sure that
the boundary between activity and user_search
is correct, as most of the testing uses
the configuration of UserSearch from
static/js/activity.js.

It does not use a real buddy_list, though,
which simplifies some tests.

I cleaned up some tests by making sure we
were testing both sides of conditions more
rigorously.

After this change we no longer need the
bloated activity.js tests to maintain full
coverage on static/js/user_search.js.
2021-05-18 14:16:55 -04:00