From f0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Mon, 19 Jul 2021 20:06:08 +0300 Subject: Apply Prettier --- test/i18n.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test/i18n.test.ts') 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) { -- cgit v1.2.3