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:
parent
bbacea255f
commit
9001a8cbe1
4 changed files with 30 additions and 0 deletions
|
@ -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"))
|
||||
);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue