aboutsummaryrefslogtreecommitdiff
path: root/test/js/first_party/utf-8-validate/utf-8-validate.test.ts
blob: 781f9df8458f14f6ad1754e5c07fa6760599ca00 (plain) (blame)
1
2
3
4
5
6
7
import { test, expect } from "bun:test";
import isValidUTF8 from "utf-8-validate";

test("utf-8-validate", () => {
  expect(isValidUTF8(Buffer.from("😀"))).toBeTrue();
  expect(isValidUTF8(Buffer.from([0xff]))).toBeFalse();
});