chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -4,38 +4,28 @@ import { stripRedundantSubsystemPrefixForConsole } from "../logging.js";
describe("stripRedundantSubsystemPrefixForConsole", () => {
it("drops '<subsystem>:' prefix", () => {
expect(
stripRedundantSubsystemPrefixForConsole("discord: hello", "discord"),
).toBe("hello");
expect(stripRedundantSubsystemPrefixForConsole("discord: hello", "discord")).toBe("hello");
});
it("drops '<Subsystem>:' prefix case-insensitively", () => {
expect(
stripRedundantSubsystemPrefixForConsole("WhatsApp: hello", "whatsapp"),
).toBe("hello");
expect(stripRedundantSubsystemPrefixForConsole("WhatsApp: hello", "whatsapp")).toBe("hello");
});
it("drops '<subsystem> ' prefix", () => {
expect(
stripRedundantSubsystemPrefixForConsole(
"discord gateway: closed",
"discord",
),
).toBe("gateway: closed");
expect(stripRedundantSubsystemPrefixForConsole("discord gateway: closed", "discord")).toBe(
"gateway: closed",
);
});
it("drops '[subsystem]' prefix", () => {
expect(
stripRedundantSubsystemPrefixForConsole(
"[discord] connection stalled",
"discord",
),
).toBe("connection stalled");
expect(stripRedundantSubsystemPrefixForConsole("[discord] connection stalled", "discord")).toBe(
"connection stalled",
);
});
it("keeps messages that do not start with the subsystem", () => {
expect(
stripRedundantSubsystemPrefixForConsole("discordant: hello", "discord"),
).toBe("discordant: hello");
expect(stripRedundantSubsystemPrefixForConsole("discordant: hello", "discord")).toBe(
"discordant: hello",
);
});
});