test: refactor tests, format files
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import TextConfig from "$components/text/TextConfig.svelte";
|
||||
import { render, screen, cleanup } from "@testing-library/svelte";
|
||||
import { describe, expect, it, afterEach } from "vitest";
|
||||
import { cleanup, render } from "@testing-library/svelte";
|
||||
import { afterEach, describe, it } from "vitest";
|
||||
|
||||
afterEach(() => {
|
||||
cleanup();
|
||||
@@ -10,8 +10,4 @@ describe("TextConfig.svelte", () => {
|
||||
it("should render without crashing", () => {
|
||||
render(TextConfig);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import TextInlineEdit from "$components/text/TextInlineEdit.svelte";
|
||||
import { render, cleanup } from "@testing-library/svelte";
|
||||
import { describe, expect, it, afterEach } from "vitest";
|
||||
import { cleanup, render } from "@testing-library/svelte";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
|
||||
afterEach(() => {
|
||||
cleanup();
|
||||
@@ -21,8 +21,6 @@ describe("TextInlineEdit.svelte", () => {
|
||||
expect(input).toHaveValue("Test text");
|
||||
});
|
||||
|
||||
|
||||
|
||||
it("should render with empty text", () => {
|
||||
render(TextInlineEdit, {
|
||||
props: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { render, screen, fireEvent } from "@testing-library/svelte";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import TextInput from "$components/text/TextInput.svelte";
|
||||
import { fireEvent, render } from "@testing-library/svelte";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
describe("TextInput.svelte", () => {
|
||||
it("should render with initial value", () => {
|
||||
@@ -63,6 +63,4 @@ describe("TextInput.svelte", () => {
|
||||
|
||||
expect(onenter).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import TextManager from "$components/text/TextManager.svelte";
|
||||
import { textsState } from "$states/texts.svelte";
|
||||
import { render, screen } from "@testing-library/svelte";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { render } from "@testing-library/svelte";
|
||||
import { beforeEach, describe, it } from "vitest";
|
||||
|
||||
describe("TextManager.svelte", () => {
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user