Files
SillyTavern/tests
Tony Gies 994234e557 Add unit tests for pure functions in src/util.js (#5231)
77 tests covering 24 pure functions: keyToEnv, getBasicAuthHeader,
getHexString, normalizeZipEntryPath, deepMerge, uuidv4,
humanizedDateTime, tryParse, clientRelativePath, getUniqueName,
removeFileExtension, removeColorFormatting, getSeparator, isValidUrl,
urlHostnameToIPv6, toBoolean, stringToBool, trimV1, trimTrailingSlash,
mutateJsonString, isPathUnderParent, isFileURL, getRequestURL, and
formatBytes (via getBasicAuthHeader pattern).

These are all deterministic, side-effect-free functions tested without
any mocking. Placed in a separate file from the existing util.test.js
to keep concerns separated.
2026-03-01 16:39:24 +02:00
..
2026-02-24 23:45:41 +02:00