mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
8 lines
230 B
TypeScript
8 lines
230 B
TypeScript
import { expect, test } from "bun:test";
|
|
import isValidUTF8 from "utf-8-validate";
|
|
|
|
test("utf-8-validate", () => {
|
|
expect(isValidUTF8(Buffer.from("😀"))).toBeTrue();
|
|
expect(isValidUTF8(Buffer.from([0xff]))).toBeFalse();
|
|
});
|