summaryrefslogtreecommitdiff
path: root/test/i18n.test.ts
diff options
context:
space:
mode:
authorKirill Rogovoy <[email protected]>2021-07-19 20:06:08 +0300
committerKirill Rogovoy <[email protected]>2021-07-19 20:06:08 +0300
commitf0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 (patch)
tree575c0ff2cbb846252bd2e494c81c396846aab2f6 /test/i18n.test.ts
parent67ad38d0a7cd319623e9f41c0c381ed5c5f6f973 (diff)
Apply Prettier
Diffstat (limited to 'test/i18n.test.ts')
-rw-r--r--test/i18n.test.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/i18n.test.ts b/test/i18n.test.ts
index 61a4963..913054e 100644
--- a/test/i18n.test.ts
+++ b/test/i18n.test.ts
@@ -1,5 +1,5 @@
-const en = require("../app/i18n/en.json")
-const { exec } = require("child_process")
+const en = require('../app/i18n/en.json')
+const { exec } = require('child_process')
// Use this array for keys that for whatever reason aren't greppable so they
// don't hold your test suite hostage by always failing.
@@ -10,7 +10,7 @@ const EXCEPTIONS = [
function iterate(obj, stack, array) {
for (const property in obj) {
if (Object.prototype.hasOwnProperty.call(obj, property)) {
- if (typeof obj[property] === "object") {
+ if (typeof obj[property] === 'object') {
iterate(obj[property], `${stack}.${property}`, array)
} else {
array.push(`${stack.slice(1)}.${property}`)
@@ -40,14 +40,14 @@ function iterate(obj, stack, array) {
*
*/
-describe("i18n", () => {
- test("There are no missing keys", (done) => {
+describe('i18n', () => {
+ test('There are no missing keys', (done) => {
// Actual command output:
// grep "Tx=\"\S*\"\|tx=\"\S*\"\|translate(\"\S*\"" -ohr './app' | grep -o "\".*\""
const command = `grep "Tx=\\"\\S*\\"\\|tx=\\"\\S*\\"\\|translate(\\"\\S*\\"" -ohr './app' | grep -o "\\".*\\""`
exec(command, (_, stdout) => {
- const allTranslationsDefined = iterate(en, "", [])
- const allTranslationsUsed = stdout.replace(/"/g, "").split("\n")
+ const allTranslationsDefined = iterate(en, '', [])
+ const allTranslationsUsed = stdout.replace(/"/g, '').split('\n')
allTranslationsUsed.splice(-1, 1)
for (let i = 0; i < allTranslationsUsed.length; i += 1) {