From fa1afbcf4a0c007473377b6d11409cbc47427555 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 19 Oct 2021 14:06:22 -0400 Subject: [PATCH] test: restore commented-out i18n test --- test/i18n.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/test/i18n.js b/test/i18n.js index 69f67ce08c..692232b305 100644 --- a/test/i18n.js +++ b/test/i18n.js @@ -89,21 +89,21 @@ describe('i18n', () => { }); it('should contain every translation key contained in its source counterpart', () => { - // const sourceArr = Array.from(sourceStrings.keys()); - // sourceArr.forEach((namespace) => { - // const sourceKeys = Object.keys(sourceStrings.get(namespace)); - // const translationKeys = Object.keys(strings.get(namespace)); - - // assert(sourceKeys && translationKeys); - // sourceKeys.forEach((key) => { - // assert(translationKeys.includes(key), `${namespace.slice(1, -5)}:${key} missing in ${language}`); - // }); - // assert.strictEqual( - // sourceKeys.length, - // translationKeys.length, - // `Extra keys found in namespace ${namespace.slice(1, -5)} for language "${language}"` - // ); - // }); + const sourceArr = Array.from(sourceStrings.keys()); + sourceArr.forEach((namespace) => { + const sourceKeys = Object.keys(sourceStrings.get(namespace)); + const translationKeys = Object.keys(strings.get(namespace)); + + assert(sourceKeys && translationKeys); + sourceKeys.forEach((key) => { + assert(translationKeys.includes(key), `${namespace.slice(1, -5)}:${key} missing in ${language}`); + }); + assert.strictEqual( + sourceKeys.length, + translationKeys.length, + `Extra keys found in namespace ${namespace.slice(1, -5)} for language "${language}"` + ); + }); }); }); });