mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 11:06:10 +00:00
LibJS: Implement Intl %SegmentsPrototype%[@@iterator]
This commit is contained in:
parent
6c26a02aa8
commit
4ba4e4c777
Notes:
sideshowbarker
2024-07-17 19:58:18 +09:00
Author: https://github.com/IdanHo
Commit: 4ba4e4c777
Pull-request: https://github.com/SerenityOS/serenity/pull/12211
Reviewed-by: https://github.com/linusg ✅
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 34 additions and 0 deletions
|
@ -9,4 +9,12 @@ describe("correct behavior", () => {
|
|||
Object.getPrototypeOf(segmenter.segment("friends"))
|
||||
);
|
||||
});
|
||||
|
||||
test("returns segments object segment iterator", () => {
|
||||
const segmenter = new Intl.Segmenter();
|
||||
const segments = segmenter.segment("hello friends!");
|
||||
expect(Object.getPrototypeOf(segments[Symbol.iterator]())[Symbol.toStringTag]).toBe(
|
||||
"Segmenter String Iterator"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue