tests: Fix predicate mock in simulate_narrow.

predicate is expected to return a function, not a boolean.  The
boolean true was causing _.filter to match items with a property named
"true", which is definitely not what was intended.  Matching no items
is probably also not intended, but matching every item causes the test
to fail.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-02-08 02:20:02 +00:00 committed by Tim Abbott
parent 11b5d80800
commit 8dee0ab1e0
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ run_test('initialize', () => {
function simulate_narrow() {
const filter = {
predicate: function () { return true; },
predicate: () => () => false,
};
narrow_state.active = function () { return true; };