add color test for chunking

This commit is contained in:
pfg
2025-07-28 21:42:34 -07:00
parent 338ede0a38
commit 7b40384b32
2 changed files with 37 additions and 0 deletions

View File

@@ -35,3 +35,15 @@ try {
} catch (e) {
console.log(e.message);
}
const longInt32ArrayExpected = new Int32Array(100000);
const longInt32ArrayReceived = new Int32Array(100000);
for (let i = 0; i < 100000; i++) {
longInt32ArrayExpected[i] = i;
longInt32ArrayReceived[i] = i + 1;
}
try {
expect(longInt32ArrayReceived).toEqual(longInt32ArrayExpected);
} catch (e) {
console.log(e.message);
}

View File

@@ -920,6 +920,31 @@ test("color", async () => {
\x1B[31m+ Received + 7\x1B[0m
\x1B[2mexpect(\x1B[0m\x1B[31mreceived\x1B[0m\x1B[2m).\x1B[0mtoEqual\x1B[2m(\x1B[0m\x1B[32mexpected\x1B[0m\x1B[2m)\x1B[0m
\x1B[36m@@ -1,8 +1,8 @@\x1B[0m
\x1B[0m\x1B[2m\x1B[0m
\x1B[0m\x1B[2mInt32Array [\x1B[0m
\x1B[32m- \x1B[0m\x1B[32m\x1B[7m 0,\x1B[0m
\x1B[0m\x1B[2m 1,\x1B[0m
\x1B[0m\x1B[2m 2,\x1B[0m
\x1B[0m\x1B[2m 3,\x1B[0m
\x1B[0m\x1B[2m 4,\x1B[0m
\x1B[0m\x1B[2m 5,\x1B[0m
\x1B[36m@@ -99998,8 +99998,8 @@\x1B[0m
\x1B[0m\x1B[2m 99995,\x1B[0m
\x1B[0m\x1B[2m 99996,\x1B[0m
\x1B[0m\x1B[2m 99997,\x1B[0m
\x1B[0m\x1B[2m 99998,\x1B[0m
\x1B[0m\x1B[2m 99999,\x1B[0m
\x1B[31m+ \x1B[0m\x1B[31m\x1B[7m 100000,\x1B[0m
\x1B[0m\x1B[2m]\x1B[0m
\x1B[0m\x1B[2m\x1B[0m
\x1B[32m- Expected - 1\x1B[0m
\x1B[31m+ Received + 1\x1B[0m
"
`);
expect(spawn.exitCode).toBe(0);