mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
30 lines
774 B
JavaScript
30 lines
774 B
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import { shouldBounceForChannelNotification } from "./AppShell.helpers.ts";
|
|
|
|
test("shouldBounceForChannelNotification_allowsTopLevelChannelMessages", () => {
|
|
assert.equal(shouldBounceForChannelNotification([["h", "channel"]]), true);
|
|
});
|
|
|
|
test("shouldBounceForChannelNotification_suppressesThreadReplies", () => {
|
|
assert.equal(
|
|
shouldBounceForChannelNotification([
|
|
["h", "channel"],
|
|
["e", "root", "", "reply"],
|
|
]),
|
|
false,
|
|
);
|
|
});
|
|
|
|
test("shouldBounceForChannelNotification_allowsBroadcastReplies", () => {
|
|
assert.equal(
|
|
shouldBounceForChannelNotification([
|
|
["h", "channel"],
|
|
["e", "root", "", "reply"],
|
|
["broadcast", "1"],
|
|
]),
|
|
true,
|
|
);
|
|
});
|