Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mtuchi committed Nov 30, 2023
1 parent 1d5b62f commit 7966e6a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/salesforce/test/Adaptor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
createIf,
upsert,
upsertIf,
toUTF8,
steps,
each,
field,
Expand Down Expand Up @@ -170,4 +171,20 @@ describe('Adaptor', () => {
.catch(done);
});
});

describe('toUTF8', () => {
it('Transliterate unicode to ASCII representation', () => {
expect(toUTF8('άνθρωποι')).to.eql('anthropoi');
// Misc
expect(toUTF8('☆ ♯ ♰ ⚄ ⛌')).to.equal('* # + 5 X');
// Emojis
expect(toUTF8('👑 🌴')).to.eql(':crown: :palm_tree:');
// Letterlike
expect(toUTF8('№ ℳ ⅋ ⅍')).to.eql('No M & A/S');
// Ordinal coordinator
expect(toUTF8('Nhamaonha 6ª Classe 2023-10-09')).to.eql(
'Nhamaonha 6a Classe 2023-10-09'
);
});
});
});

0 comments on commit 7966e6a

Please sign in to comment.