Skip to content

Commit f5e169c

Browse files
committed
tests: add hybrid test
1 parent 9d73eac commit f5e169c

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

test/unicode_scripts_finder.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,20 @@ describe('unicode-scripts-finder', () => {
77
})
88

99
it('should find Latin script', () => {
10-
const res = unicodeScriptsFinder('hello')
11-
res.should.deepEqual([
12-
{ label: 'Latin', count: 5 }
10+
unicodeScriptsFinder('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.').should.deepEqual([
11+
{ label: 'Latin', count: 370 }
1312
])
1413
})
1514

1615
it('should find Greek script', () => {
17-
const res = unicodeScriptsFinder('ἀπόστασις')
18-
res.should.deepEqual([
16+
unicodeScriptsFinder('ἀπόστασις').should.deepEqual([
17+
{ label: 'Greek', count: 9 }
18+
])
19+
})
20+
21+
it('should find hybrid script', () => {
22+
unicodeScriptsFinder('Lorem ipsum ἀπόστασις').should.deepEqual([
23+
{ label: 'Latin', count: 10 },
1924
{ label: 'Greek', count: 9 }
2025
])
2126
})

0 commit comments

Comments
 (0)