Skip to content

Commit

Permalink
lemme check a case...
Browse files Browse the repository at this point in the history
  • Loading branch information
cometkim committed Jun 13, 2024
1 parent 6d7fd9b commit d79e39b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/grapheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,24 @@ test('counter examples', async t => {
});
}
});

test('break category', async t => {
let cats = {
Extended_Pictographic: [
'🏴',
],
};

for (let [cat, cases] of Object.entries(cats)) {
for (let case_ of cases) {
// @ts-ignore
let expected = GraphemeCategory[cat];
await t.test(`cat(${case_}) = ${cat} (${expected})`, () => {
assert.equal(
graphemeSegments(case_).next().value._cat,
expected,
);
});
}
}
})

0 comments on commit d79e39b

Please sign in to comment.