m234M
Denoβ€’5mo agoβ€’
2 replies
m234

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'
    );
  },
});
image.png
Was this page helpful?