mirror of https://github.com/zulip/zulip.git
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:
parent
11b5d80800
commit
8dee0ab1e0
|
@ -278,7 +278,7 @@ run_test('initialize', () => {
|
|||
|
||||
function simulate_narrow() {
|
||||
const filter = {
|
||||
predicate: function () { return true; },
|
||||
predicate: () => () => false,
|
||||
};
|
||||
|
||||
narrow_state.active = function () { return true; };
|
||||
|
|
Loading…
Reference in New Issue