mirror of
https://github.com/block/buzz.git
synced 2026-10-30 22:11:36 +00:00
Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
23 lines
618 B
JavaScript
23 lines
618 B
JavaScript
import assert from "node:assert/strict";
|
|
import { describe, it } from "node:test";
|
|
|
|
import { getInitials } from "./initials.ts";
|
|
|
|
describe("getInitials", () => {
|
|
it("filters punctuation before deriving initials", () => {
|
|
assert.equal(getInitials("B (relay)"), "BR");
|
|
});
|
|
|
|
it("handles a leading symbol on a single word", () => {
|
|
assert.equal(getInitials("(staging)"), "S");
|
|
});
|
|
|
|
it("still returns plain initials for normal names", () => {
|
|
assert.equal(getInitials("Bravo Beta"), "BB");
|
|
});
|
|
|
|
it("returns empty for a symbol-only name", () => {
|
|
assert.equal(getInitials("()"), "");
|
|
});
|
|
});
|