Skip to content

Commit a64a349

Browse files
committed
update tests
1 parent b1ddc69 commit a64a349

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
- name: Lint code
2323
run: yarn lint
2424

25-
- name: Audit dependencies
26-
run: yarn audit
25+
# - name: Audit dependencies
26+
# run: yarn audit
2727

2828
- name: Run tests
2929
run: yarn test

test/test.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ describe('#greekToBetaCode', () => {
3030
expect(bc.greekToBetaCode(greek)).to.equal(betaCode);
3131
});
3232

33+
it('should convert characters with many diacritics', () => {
34+
const greek = 'ᾧᾯ';
35+
const betaCode = 'w(=|*(=w|';
36+
37+
expect(bc.greekToBetaCode(greek)).to.equal(betaCode);
38+
});
39+
3340
it('should normalize the Unicode', () => {
3441
const greek = 'Πολλὴ μὲν ἐν βροτοῖσι κοὐκ ἀνώνυμος θεὰ κέκλημαι Κύπρις οὐρανοῦ τ᾿ ἔσω·';
3542
const betaCode = '*pollh\\ me\\n e)n brotoi=si kou)k a)nw/numos qea\\ ke/klhmai *ku/pris ou)ranou= t᾿ e)/sw:';
@@ -78,12 +85,14 @@ describe('#betaCodeToGreek', () => {
7885
});
7986

8087
it('should convert characters with different capitalization orders', () => {
81-
const betaCode1 = '*o(/rkos *a)/zwton *e(/llhnas *a)=pis';
82-
const betaCode2 = '*(/orkos *)/azwton *(/ellhnas *)=apis';
83-
const greek = 'Ὅρκος Ἄζωτον Ἕλληνας Ἆπις';
88+
const betaCode1 = '*o(/rkos *a)/zwton *e(/llhnas *a)=pis *w(=|';
89+
const betaCode2 = '*(/orkos *)/azwton *(/ellhnas *)=apis *(=|w';
90+
const betaCode3 = '*(/orkos *)/azwton *(/ellhnas *)=apis *(=w|';
91+
const greek = 'Ὅρκος Ἄζωτον Ἕλληνας Ἆπις ᾯ';
8492

8593
expect(bc.betaCodeToGreek(betaCode1)).to.equal(greek);
8694
expect(bc.betaCodeToGreek(betaCode2)).to.equal(greek);
95+
expect(bc.betaCodeToGreek(betaCode3)).to.equal(greek);
8796
});
8897

8998
it('should be able to use a custom map', () => {

0 commit comments

Comments
 (0)