From 3dc315a0a1190da969b99b8d604ed2172410a5d4 Mon Sep 17 00:00:00 2001 From: cPhost Date: Thu, 14 Dec 2017 13:02:06 -0500 Subject: [PATCH] node tests: Add 100% coverage for narrow_state.js. --- frontend_tests/node_tests/narrow_state.js | 3 +++ tools/test-js-with-node | 1 + 2 files changed, 4 insertions(+) diff --git a/frontend_tests/node_tests/narrow_state.js b/frontend_tests/node_tests/narrow_state.js index ed1fb81eed..64656d1950 100644 --- a/frontend_tests/node_tests/narrow_state.js +++ b/frontend_tests/node_tests/narrow_state.js @@ -195,6 +195,9 @@ function set_filter(operators) { ['pm-with', 'test@foo.com'], ]); assert.equal(narrow_state.topic(), undefined); + + narrow_state.set_current_filter(undefined); + assert.equal(narrow_state.topic(), undefined); }()); diff --git a/tools/test-js-with-node b/tools/test-js-with-node index 88cce0f3e2..441d6b1491 100755 --- a/tools/test-js-with-node +++ b/tools/test-js-with-node @@ -40,6 +40,7 @@ enforce_fully_covered = { 'static/js/markdown.js', 'static/js/message_store.js', 'static/js/muting.js', + 'static/js/narrow_state.js', 'static/js/people.js', 'static/js/pm_conversations.js', 'static/js/pm_list.js',