Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
import { describe, expect, it } from "vitest";
import { normalizeNonEmptyString, normalizeStringArray } from "./system-run-normalize.js";
describe("system run normalization helpers", () => {
it.each([
{ value: " hello ", expected: "hello" },
{ value: " \n\t ", expected: null },
{ value: 42, expected: null },
{ value: null, expected: null },
])("normalizes non-empty strings for %j", ({ value, expected }) => {
expect(normalizeNonEmptyString(value)).toBe(expected);
});
it.each([
{ value: [" alpha ", 42, false], expected: [" alpha ", "42", "false"] },
{ value: undefined, expected: [] },
{ value: "alpha", expected: [] },
])("normalizes string arrays for %j", ({ value, expected }) => {
expect(normalizeStringArray(value)).toEqual(expected);
});
});
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-04-27)
¤
*© Formatika GbR, Deutschland