Skip to content

Node.js based forum software built for the modern web

test: restore commented-out i18n test

Julian Lamfa1afbcf4a0c
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}"`
+ );
+ });
});
});
});