mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
reload_state: Add 100% test coverage.
This commit adds a new reload_state.js file to node_tests/ which completes the missing coverage from reload_state.
This commit is contained in:
20
frontend_tests/node_tests/reload_state.js
Normal file
20
frontend_tests/node_tests/reload_state.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
const {strict: assert} = require("assert");
|
||||||
|
|
||||||
|
const {zrequire} = require("../zjsunit/namespace");
|
||||||
|
const {run_test} = require("../zjsunit/test");
|
||||||
|
|
||||||
|
const reload_state = zrequire("reload_state");
|
||||||
|
|
||||||
|
run_test("set_state_to_pending", () => {
|
||||||
|
assert(!reload_state.is_pending());
|
||||||
|
reload_state.set_state_to_pending();
|
||||||
|
assert(reload_state.is_pending());
|
||||||
|
});
|
||||||
|
|
||||||
|
run_test("set_state_to_in_progress", () => {
|
||||||
|
assert(!reload_state.is_in_progress());
|
||||||
|
reload_state.set_state_to_in_progress();
|
||||||
|
assert(reload_state.is_in_progress());
|
||||||
|
});
|
||||||
@@ -104,7 +104,6 @@ EXEMPT_FILES = {
|
|||||||
"static/js/realm_logo.js",
|
"static/js/realm_logo.js",
|
||||||
"static/js/recent_topics.js",
|
"static/js/recent_topics.js",
|
||||||
"static/js/reload.js",
|
"static/js/reload.js",
|
||||||
"static/js/reload_state.js",
|
|
||||||
"static/js/reminder.js",
|
"static/js/reminder.js",
|
||||||
"static/js/rendered_markdown.js",
|
"static/js/rendered_markdown.js",
|
||||||
"static/js/resize.js",
|
"static/js/resize.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user