m234
m2346h ago

deno test output: tty ansi is not escaped

When im testing deno tty ansi codes (e.g. test if "\x1B[2F" is a string) they are not escaped when printing within terminal. + they are diff-colored so it's completely broken. This should be easy to fix. The test:
Deno.test({
name: "partial update small screen",
fn() {
assertEquals(
optimizedUpdate("hello", "xello\nworld", sizeSmallWidth),
"\x1B[2Fx\x1B[4C\nworld",
//'\x1b[0G\x1b[1C\x1b[1Fx\x1b[1C\nworld'
);
},
});
Deno.test({
name: "partial update small screen",
fn() {
assertEquals(
optimizedUpdate("hello", "xello\nworld", sizeSmallWidth),
"\x1B[2Fx\x1B[4C\nworld",
//'\x1b[0G\x1b[1C\x1b[1Fx\x1b[1C\nworld'
);
},
});
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?