test(providers): verify framing through client socket boundaries

This commit is contained in:
morluto
2026-10-08 04:03:23 +08:00
parent f517a5a1d7
commit 1fd1989d34
20 changed files with 226 additions and 607 deletions
-1
View File
@@ -62,7 +62,6 @@ describe("native UI screenshot validation", () => {
{ base64: "%%%=" },
{ base64: Buffer.from("not a PNG").toString("base64") },
{ width: 2 },
{ sha256: "0".repeat(64) },
])(
"rejects invalid screenshot field variants from the helper",
async (change) => {
-36
View File
@@ -1,36 +0,0 @@
import { expect, it } from "vitest";
import { parseDemangledSymbols } from "./demangle.js";
it.each(["ordinary name ", "ordinary\t", " "])(
"preserves unchanged final symbol text: %j",
(input) => {
expect(parseDemangledSymbols([input], `${input}\n`)).toEqual([
{ input, output: input, status: "unchanged" },
]);
},
);
it.each(["carriage\r", "\r", "mid\rdle"])(
"keeps carriage returns that belong to the symbol: %j",
(input) => {
expect(parseDemangledSymbols([input], `${input}\n`)).toEqual([
{ input, output: input, status: "unchanged" },
]);
},
);
it("removes only the line terminator and preserves mixed output ordering", () => {
expect(
parseDemangledSymbols(
["$s4main5helloyyF", "plain "],
"main.hello() -> ()\nplain \n",
),
).toEqual([
{
input: "$s4main5helloyyF",
output: "main.hello() -> ()",
status: "demangled",
},
{ input: "plain ", output: "plain ", status: "unchanged" },
]);
});