refactor(developer): PR suggestion: NFC literal

Co-authored-by: Eddie Antonio Santos <Eddie.Santos@nrc-cnrc.gc.ca>
This commit is contained in:
Joshua Horton 2020-07-14 07:52:02 +07:00 • committed by Marc Durdin
parent d20997f5d2
commit 33f60c08fd

View file

@ -69,9 +69,10 @@ describe('parseWordList', function () {
' hello ', //4, expect to trim whitespace
'hello']; //5
const expected: WordList = {};
expected['hello'] = 10; /* 1+4+5 trimmed and identical */
expected['hell'+String.fromCharCode(0x00F3)] = 5 /* 2+3 normalised to NFC */
const expected: WordList = {
'hello': 10, /* 1+4+5 trimmed and identical */
'hell\u00f3': 5, /* 2+3 normalised to NFC */
};
// Build a wordlist from the array
let file = `# this is a comment\n`;
@ -84,4 +85,3 @@ describe('parseWordList', function () {
assert.deepEqual(repeatedWords, expected);
});
});