From 79ff32607e70a1bc80dfefe0201d6970b4b3ed91 Mon Sep 17 00:00:00 2001 From: Michael Wuergler Date: Mon, 3 Jun 2024 14:41:01 +0200 Subject: [PATCH] refactor: move fixture files outside of src --- {src/tests/fixtures => fixtures}/i18n/de.json | 0 {src/tests/fixtures => fixtures}/i18n/en.json | 0 {src/tests/fixtures => fixtures}/i18n/fr.json | 0 i18n-validator.config.json | 2 +- src/rules/no-empty-messages/no-empty-messages.spec.ts | 2 +- src/rules/no-html-messages/no-html-messages.spec.ts | 2 +- .../no-invalid-configuration/no-invalid-configuration.spec.ts | 4 ++-- src/rules/no-invalid-variables/no-invalid-variables.spec.ts | 2 +- src/rules/no-missing-keys/no-missing-keys.spec.ts | 2 +- .../no-untranslated-messages/no-untranslated-messages.spec.ts | 2 +- src/{tests => }/utils/test-helpers.ts | 2 +- 11 files changed, 9 insertions(+), 9 deletions(-) rename {src/tests/fixtures => fixtures}/i18n/de.json (100%) rename {src/tests/fixtures => fixtures}/i18n/en.json (100%) rename {src/tests/fixtures => fixtures}/i18n/fr.json (100%) rename src/{tests => }/utils/test-helpers.ts (64%) diff --git a/src/tests/fixtures/i18n/de.json b/fixtures/i18n/de.json similarity index 100% rename from src/tests/fixtures/i18n/de.json rename to fixtures/i18n/de.json diff --git a/src/tests/fixtures/i18n/en.json b/fixtures/i18n/en.json similarity index 100% rename from src/tests/fixtures/i18n/en.json rename to fixtures/i18n/en.json diff --git a/src/tests/fixtures/i18n/fr.json b/fixtures/i18n/fr.json similarity index 100% rename from src/tests/fixtures/i18n/fr.json rename to fixtures/i18n/fr.json diff --git a/i18n-validator.config.json b/i18n-validator.config.json index eba3b54..f0bc2f9 100644 --- a/i18n-validator.config.json +++ b/i18n-validator.config.json @@ -5,7 +5,7 @@ "de": "de.json", "fr": "fr.json" }, - "pathToTranslatedFiles": "src/tests/fixtures/i18n", + "pathToTranslatedFiles": "fixtures/i18n", "rules": { "no-untranslated-messages": "error", "no-empty-messages": "error", diff --git a/src/rules/no-empty-messages/no-empty-messages.spec.ts b/src/rules/no-empty-messages/no-empty-messages.spec.ts index 106353a..7f34fdc 100644 --- a/src/rules/no-empty-messages/no-empty-messages.spec.ts +++ b/src/rules/no-empty-messages/no-empty-messages.spec.ts @@ -1,4 +1,4 @@ -import { createMockProblemReporter } from "../../tests/utils/test-helpers.ts"; +import { createMockProblemReporter } from "../../utils/test-helpers.ts"; import { Config, RuleContext, diff --git a/src/rules/no-html-messages/no-html-messages.spec.ts b/src/rules/no-html-messages/no-html-messages.spec.ts index b7445cf..069babe 100644 --- a/src/rules/no-html-messages/no-html-messages.spec.ts +++ b/src/rules/no-html-messages/no-html-messages.spec.ts @@ -1,4 +1,4 @@ -import { createMockProblemReporter } from "../../tests/utils/test-helpers.ts"; +import { createMockProblemReporter } from "../../utils/test-helpers.ts"; import { Config, RuleContext, diff --git a/src/rules/no-invalid-configuration/no-invalid-configuration.spec.ts b/src/rules/no-invalid-configuration/no-invalid-configuration.spec.ts index be27f72..0263701 100644 --- a/src/rules/no-invalid-configuration/no-invalid-configuration.spec.ts +++ b/src/rules/no-invalid-configuration/no-invalid-configuration.spec.ts @@ -1,11 +1,11 @@ -import { createMockProblemReporter } from "../../tests/utils/test-helpers.ts"; +import { createMockProblemReporter } from "../../utils/test-helpers"; import { Config, RuleContext, RuleSeverity, TranslationFiles, } from "../../types.ts"; -import { noInvalidConfiguration } from "./no-invalid-configuration.ts"; +import { noInvalidConfiguration } from "./no-invalid-configuration"; import { getInvalidPathToTranslatedFilesProblem, getInvalidTranslationFilesProblem, diff --git a/src/rules/no-invalid-variables/no-invalid-variables.spec.ts b/src/rules/no-invalid-variables/no-invalid-variables.spec.ts index bfeb237..4c26219 100644 --- a/src/rules/no-invalid-variables/no-invalid-variables.spec.ts +++ b/src/rules/no-invalid-variables/no-invalid-variables.spec.ts @@ -1,4 +1,4 @@ -import { createMockProblemReporter } from "../../tests/utils/test-helpers.ts"; +import { createMockProblemReporter } from "../../utils/test-helpers.ts"; import { Config, RuleContext, diff --git a/src/rules/no-missing-keys/no-missing-keys.spec.ts b/src/rules/no-missing-keys/no-missing-keys.spec.ts index 8593036..10fe465 100644 --- a/src/rules/no-missing-keys/no-missing-keys.spec.ts +++ b/src/rules/no-missing-keys/no-missing-keys.spec.ts @@ -1,4 +1,4 @@ -import { createMockProblemReporter } from "../../tests/utils/test-helpers.ts"; +import { createMockProblemReporter } from "../../utils/test-helpers.ts"; import { Config, RuleContext, diff --git a/src/rules/no-untranslated-messages/no-untranslated-messages.spec.ts b/src/rules/no-untranslated-messages/no-untranslated-messages.spec.ts index f8a31eb..e3a89fa 100644 --- a/src/rules/no-untranslated-messages/no-untranslated-messages.spec.ts +++ b/src/rules/no-untranslated-messages/no-untranslated-messages.spec.ts @@ -1,4 +1,4 @@ -import { createMockProblemReporter } from "../../tests/utils/test-helpers.ts"; +import { createMockProblemReporter } from "../../utils/test-helpers.ts"; import { Config, RuleContext, diff --git a/src/tests/utils/test-helpers.ts b/src/utils/test-helpers.ts similarity index 64% rename from src/tests/utils/test-helpers.ts rename to src/utils/test-helpers.ts index 71805ba..d15dff1 100644 --- a/src/tests/utils/test-helpers.ts +++ b/src/utils/test-helpers.ts @@ -1,4 +1,4 @@ -import { ProblemReporter } from "../../classes/problem-reporter"; +import { ProblemReporter } from "../classes/problem-reporter"; export const createMockProblemReporter = () => { return {