mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
This lets us simplify the long-ish ‘../../static/js’ paths, and will remove the need for the ‘zrequire’ wrapper. Signed-off-by: Anders Kaseorg <anders@zulip.com>
16 lines
562 B
JavaScript
16 lines
562 B
JavaScript
"use strict";
|
|
|
|
const compose_banner = require("../../src/compose_banner");
|
|
|
|
const $ = require("./zjquery");
|
|
|
|
exports.mock_banners = () => {
|
|
// zjquery doesn't support `remove`, which is used when clearing the compose box.
|
|
// TODO: improve how we test this so that we don't have to mock things like this.
|
|
for (const classname of Object.values(compose_banner.CLASSNAMES)) {
|
|
$(`#compose_banners .${classname}`).remove = () => {};
|
|
}
|
|
$("#compose_banners .warning").remove = () => {};
|
|
$("#compose_banners .error").remove = () => {};
|
|
};
|