From 9991babe7b1d34cf9fb07ecc8dc2ae73612dfc9f Mon Sep 17 00:00:00 2001 From: rare-magma Date: Sat, 31 Aug 2024 21:37:13 +0200 Subject: [PATCH] style: order imports Signed-off-by: rare-magma --- src/App.test.tsx | 2 +- src/components/Budget/BudgetPage.test.tsx | 2 +- src/components/CalculateButton/CalculateButton.test.tsx | 2 +- src/components/Chart/Chart.test.tsx | 2 +- src/components/ItemForm/ItemFormGroup.test.tsx | 4 ++-- src/components/LandingPage/LandingPage.test.tsx | 2 +- src/components/NavBar/NavBar.test.tsx | 2 +- src/components/StatCard/StatCard.test.tsx | 2 +- src/components/TableCard/TableCard.test.tsx | 2 +- src/context/BudgetContext.test.tsx | 2 +- src/guitos/domain/budget.mother.ts | 2 +- src/guitos/domain/budget.test.ts | 2 +- src/utils.test.ts | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/App.test.tsx b/src/App.test.tsx index 6eb6e28..7d3223b 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -3,8 +3,8 @@ import userEvent from "@testing-library/user-event"; import { describe, expect, it } from "vitest"; import { App } from "./App"; import { budgetsDB, calcHistDB, optionsDB } from "./db"; -import { budgetContextSpy, testEmptyBudgetContext } from "./setupTests"; import { BudgetMother } from "./guitos/domain/budget.mother"; +import { budgetContextSpy, testEmptyBudgetContext } from "./setupTests"; describe("App", () => { const comp = ; diff --git a/src/components/Budget/BudgetPage.test.tsx b/src/components/Budget/BudgetPage.test.tsx index c042545..1cf12e1 100644 --- a/src/components/Budget/BudgetPage.test.tsx +++ b/src/components/Budget/BudgetPage.test.tsx @@ -4,6 +4,7 @@ import { act } from "react-dom/test-utils"; import { BrowserRouter } from "react-router-dom"; import { describe, expect, it } from "vitest"; import { budgetsDB } from "../../db"; +import { BudgetMother } from "../../guitos/domain/budget.mother"; import { budgetContextSpy, redoMock, @@ -13,7 +14,6 @@ import { undoMock, } from "../../setupTests"; import { BudgetPage } from "./BudgetPage"; -import { BudgetMother } from "../../guitos/domain/budget.mother"; describe("BudgetPage", () => { const comp = ( diff --git a/src/components/CalculateButton/CalculateButton.test.tsx b/src/components/CalculateButton/CalculateButton.test.tsx index a8ca00e..16d5d24 100644 --- a/src/components/CalculateButton/CalculateButton.test.tsx +++ b/src/components/CalculateButton/CalculateButton.test.tsx @@ -3,8 +3,8 @@ import userEvent from "@testing-library/user-event"; import { BrowserRouter } from "react-router-dom"; import { vi } from "vitest"; import { describe, expect, it } from "vitest"; -import { CalculateButton } from "./CalculateButton"; import { BudgetItemsMother } from "../../guitos/domain/budgetItem.mother"; +import { CalculateButton } from "./CalculateButton"; describe("CalculateButton", () => { const onCalculate = vi.fn(); diff --git a/src/components/Chart/Chart.test.tsx b/src/components/Chart/Chart.test.tsx index 831b1f3..09f13bf 100644 --- a/src/components/Chart/Chart.test.tsx +++ b/src/components/Chart/Chart.test.tsx @@ -1,8 +1,8 @@ import { render, screen } from "@testing-library/react"; import { vi } from "vitest"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; -import { Chart } from "./Chart"; import { BudgetMother } from "../../guitos/domain/budget.mother"; +import { Chart } from "./Chart"; describe("Chart", () => { const comp = ( diff --git a/src/components/ItemForm/ItemFormGroup.test.tsx b/src/components/ItemForm/ItemFormGroup.test.tsx index 286eae2..811fcd5 100644 --- a/src/components/ItemForm/ItemFormGroup.test.tsx +++ b/src/components/ItemForm/ItemFormGroup.test.tsx @@ -3,14 +3,14 @@ import userEvent from "@testing-library/user-event"; import { createRef } from "react"; import { BrowserRouter } from "react-router-dom"; import { describe, expect, it } from "vitest"; +import { BudgetMother } from "../../guitos/domain/budget.mother"; +import { BudgetItemsMother } from "../../guitos/domain/budgetItem.mother"; import { configContextSpy, setBudgetMock, testSpanishConfigContext, } from "../../setupTests"; import { ItemFormGroup } from "./ItemFormGroup"; -import { BudgetMother } from "../../guitos/domain/budget.mother"; -import { BudgetItemsMother } from "../../guitos/domain/budgetItem.mother"; describe("ItemFormGroup", () => { const ref = createRef(); diff --git a/src/components/LandingPage/LandingPage.test.tsx b/src/components/LandingPage/LandingPage.test.tsx index 74b55b2..a16e9cd 100644 --- a/src/components/LandingPage/LandingPage.test.tsx +++ b/src/components/LandingPage/LandingPage.test.tsx @@ -2,6 +2,7 @@ import { render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { BrowserRouter } from "react-router-dom"; import { beforeEach, describe, expect, it } from "vitest"; +import { BudgetMother } from "../../guitos/domain/budget.mother"; import { budgetContextSpy, generalContextSpy, @@ -10,7 +11,6 @@ import { testGeneralContext, } from "../../setupTests"; import { LandingPage } from "./LandingPage"; -import { BudgetMother } from "../../guitos/domain/budget.mother"; describe("LandingPage", () => { const comp = ( diff --git a/src/components/NavBar/NavBar.test.tsx b/src/components/NavBar/NavBar.test.tsx index 80a7a9c..061c926 100644 --- a/src/components/NavBar/NavBar.test.tsx +++ b/src/components/NavBar/NavBar.test.tsx @@ -2,13 +2,13 @@ import { render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { BrowserRouter } from "react-router-dom"; import { describe, expect, it } from "vitest"; +import { BudgetMother } from "../../guitos/domain/budget.mother"; import { budgetContextSpy, setBudgetMock, testEmptyBudgetContext, } from "../../setupTests"; import { NavBar } from "./NavBar"; -import { BudgetMother } from "../../guitos/domain/budget.mother"; describe("NavBar", () => { const comp = ( diff --git a/src/components/StatCard/StatCard.test.tsx b/src/components/StatCard/StatCard.test.tsx index d3783ee..71752d7 100644 --- a/src/components/StatCard/StatCard.test.tsx +++ b/src/components/StatCard/StatCard.test.tsx @@ -2,9 +2,9 @@ import { render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { vi } from "vitest"; import { describe, expect, it } from "vitest"; +import { BudgetMother } from "../../guitos/domain/budget.mother"; import { setBudgetMock } from "../../setupTests"; import { StatCard } from "./StatCard"; -import { BudgetMother } from "../../guitos/domain/budget.mother"; describe("StatCard", () => { const onShowGraphs = vi.fn(); diff --git a/src/components/TableCard/TableCard.test.tsx b/src/components/TableCard/TableCard.test.tsx index 9370473..b4f7869 100644 --- a/src/components/TableCard/TableCard.test.tsx +++ b/src/components/TableCard/TableCard.test.tsx @@ -2,9 +2,9 @@ import { cleanup, render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { BrowserRouter } from "react-router-dom"; import { describe, expect, it } from "vitest"; +import { BudgetMother } from "../../guitos/domain/budget.mother"; import { setBudgetMock } from "../../setupTests"; import TableCard from "./TableCard"; -import { BudgetMother } from "../../guitos/domain/budget.mother"; describe("TableCard", () => { const comp = ( diff --git a/src/context/BudgetContext.test.tsx b/src/context/BudgetContext.test.tsx index b3aebcc..34adba3 100644 --- a/src/context/BudgetContext.test.tsx +++ b/src/context/BudgetContext.test.tsx @@ -1,7 +1,7 @@ import { render, screen } from "@testing-library/react"; import { describe, expect, it } from "vitest"; -import { BudgetProvider, useBudget } from "./BudgetContext"; import { BudgetMother } from "../guitos/domain/budget.mother"; +import { BudgetProvider, useBudget } from "./BudgetContext"; function TestComponent() { const { budget, budgetList } = useBudget(); diff --git a/src/guitos/domain/budget.mother.ts b/src/guitos/domain/budget.mother.ts index 9651d12..d38c567 100644 --- a/src/guitos/domain/budget.mother.ts +++ b/src/guitos/domain/budget.mother.ts @@ -1,6 +1,6 @@ +import { Budget } from "./budget"; import { BudgetItem } from "./budgetItem"; import { Uuid } from "./uuid"; -import { Budget } from "./budget"; // biome-ignore lint/complexity/noStaticOnlyClass: export class BudgetMother { diff --git a/src/guitos/domain/budget.test.ts b/src/guitos/domain/budget.test.ts index 7959bb8..3e9f047 100644 --- a/src/guitos/domain/budget.test.ts +++ b/src/guitos/domain/budget.test.ts @@ -1,6 +1,6 @@ import Big from "big.js"; import Papa from "papaparse"; -import { expect, test, describe } from "vitest"; +import { describe, expect, test } from "vitest"; import { Budget } from "./budget"; import { BudgetMother } from "./budget.mother"; import { BudgetItem } from "./budgetItem"; diff --git a/src/utils.test.ts b/src/utils.test.ts index 7c0ddbf..056fcc0 100644 --- a/src/utils.test.ts +++ b/src/utils.test.ts @@ -2,6 +2,7 @@ import Big from "big.js"; import { expect, test } from "vitest"; import type { FilteredItem } from "./components/ChartsPage/ChartsPage"; import type { Budget } from "./guitos/domain/budget"; +import { BudgetMother } from "./guitos/domain/budget.mother"; import type { ItemOperation } from "./guitos/domain/calculationHistoryItem"; import { Uuid } from "./guitos/domain/uuid"; import { chromeLocalesList } from "./lists/chromeLocalesList"; @@ -21,7 +22,6 @@ import { parseLocaleNumber, roundBig, } from "./utils"; -import { BudgetMother } from "./guitos/domain/budget.mother"; test("round", () => { expect(roundBig(Big(123.123123123), 5)).eq(123.12312);