1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:37:47 +00:00

LibJS: Implement Intl.Segmenter.prototype.segment

This commit is contained in:
Idan Horowitz 2022-01-30 01:31:59 +02:00 committed by Linus Groh
parent bbacea255f
commit 9001a8cbe1
4 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,12 @@
describe("correct behavior", () => {
test("length is 1", () => {
expect(Intl.Segmenter.prototype.segment).toHaveLength(1);
});
test("returns segments object with shared segments prototype", () => {
const segmenter = new Intl.Segmenter();
expect(Object.getPrototypeOf(segmenter.segment("hello"))).toBe(
Object.getPrototypeOf(segmenter.segment("friends"))
);
});
});