Disable Bun.stringWidth until failing test case passes

This commit is contained in:
Jarred Sumner
2024-01-21 06:10:07 -08:00
parent af67ee77a0
commit a8ff7be642
2 changed files with 8 additions and 1 deletions

View File

@@ -621,7 +621,6 @@ JSC_DEFINE_HOST_FUNCTION(functionHashCode,
stdin BunObject_getter_wrap_stdin DontDelete|PropertyCallback
stdout BunObject_getter_wrap_stdout DontDelete|PropertyCallback
stringHashCode functionHashCode DontDelete|Function 1
stringWidth BunObject_callback_stringWidth DontDelete|Function 2
unsafe BunObject_getter_wrap_unsafe DontDelete|PropertyCallback
version constructBunVersion ReadOnly|DontDelete|PropertyCallback
which BunObject_callback_which DontDelete|Function 1

View File

@@ -83,3 +83,11 @@ for (let matcher of ["toMatchNPMStringWidth", "toMatchNPMStringWidthExcludeANSI"
});
});
}
for (let matcher of ["toMatchNPMStringWidth", "toMatchNPMStringWidthExcludeANSI"]) {
test.todo("leading non-ansi characters in UTF-16 string seems to fail", () => {
expect("\x1b[31mhshh🌎")[matcher]();
expect("a\x1b[31mhshh🌎")[matcher]();
expect("a\x1b[31mhshh🌎a")[matcher]();
});
}