From 33f60c08fd3e57afc76b88e71e02a0cd4439a561 Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Tue, 14 Jul 2020 07:52:02 +0700 Subject: [PATCH] refactor(developer): PR suggestion: NFC literal Co-authored-by: Eddie Antonio Santos --- developer/js/tests/test-parse-wordlist.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/developer/js/tests/test-parse-wordlist.ts b/developer/js/tests/test-parse-wordlist.ts index 48fa88d692..3759c7c970 100644 --- a/developer/js/tests/test-parse-wordlist.ts +++ b/developer/js/tests/test-parse-wordlist.ts @@ -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); }); }); -