refactor(deadcode): drop orphaned extension helpers

This commit is contained in:
Peter Steinberger
2026-04-06 17:17:41 +01:00
parent ce87d5e242
commit a86fa3b211
6 changed files with 0 additions and 656 deletions

View File

@@ -2,15 +2,6 @@ import { mkdtemp, rm } from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";
import {
escapeNextcloudTalkMarkdown,
formatNextcloudTalkCodeBlock,
formatNextcloudTalkInlineCode,
formatNextcloudTalkMention,
markdownToNextcloudTalk,
stripNextcloudTalkFormatting,
truncateNextcloudTalkText,
} from "./format.js";
import {
looksLikeNextcloudTalkTargetId,
normalizeNextcloudTalkMessagingTarget,
@@ -73,30 +64,6 @@ async function makeTempDir(): Promise<string> {
}
describe("nextcloud talk core", () => {
it("accepts SecretRef botSecret and apiPassword at top-level", () => {
expect(markdownToNextcloudTalk(" **hello** ")).toBe("**hello**");
});
it("escapes markdown-sensitive characters", () => {
expect(escapeNextcloudTalkMarkdown("*hello* [x](y)")).toBe("\\*hello\\* \\[x\\]\\(y\\)");
});
it("formats mentions and code consistently", () => {
expect(formatNextcloudTalkMention("@alice")).toBe("@alice");
expect(formatNextcloudTalkMention("bob")).toBe("@bob");
expect(formatNextcloudTalkCodeBlock("const x = 1;", "ts")).toBe("```ts\nconst x = 1;\n```");
expect(formatNextcloudTalkInlineCode("x")).toBe("`x`");
expect(formatNextcloudTalkInlineCode("x ` y")).toBe("`` x ` y ``");
});
it("strips markdown formatting and truncates on word boundaries", () => {
expect(stripNextcloudTalkFormatting("**bold** [link](https://example.com) `code`")).toBe(
"bold link",
);
expect(truncateNextcloudTalkText("alpha beta gamma delta", 14)).toBe("alpha beta...");
expect(truncateNextcloudTalkText("short", 14)).toBe("short");
});
it("builds an outbound session route for normalized room targets", () => {
const route = resolveNextcloudTalkOutboundSessionRoute({
cfg: {},