Skip to content

Commit

Permalink
fixup! Migrated App test to vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Jan 9, 2025
1 parent 7d1feac commit 2f4c376
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/frontend/tests/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render } from "@testing-library/react";
import { mocked } from "jest-mock";
import { MemoryRouter } from "react-router-dom";
import * as swr from "swr";
import { beforeAll, describe, expect, test, vi } from "vitest";
Expand All @@ -18,7 +17,7 @@ describe("App", () => {
test("should render correctly", () => {
expect.assertions(1);

mocked(swr).default.mockReturnValue({
vi.mocked(swr).default.mockReturnValue({
data: testData,
error: undefined,
isLoading: false,
Expand All @@ -37,7 +36,7 @@ describe("App", () => {
test("should render projects correctly", () => {
expect.assertions(1);

mocked(swr).default.mockReturnValue({
vi.mocked(swr).default.mockReturnValue({
data: testData,
error: undefined,
isLoading: false,
Expand All @@ -56,7 +55,7 @@ describe("App", () => {
test("should render project listing correctly", () => {
expect.assertions(1);

mocked(swr).default.mockReturnValue({
vi.mocked(swr).default.mockReturnValue({
data: testData,
error: undefined,
isLoading: false,
Expand All @@ -75,7 +74,7 @@ describe("App", () => {
test("should render issue listing correctly", () => {
expect.assertions(1);

mocked(swr).default.mockReturnValue({
vi.mocked(swr).default.mockReturnValue({
data: testData,
error: undefined,
isLoading: false,
Expand All @@ -94,7 +93,7 @@ describe("App", () => {
test("should handle error gracefully", () => {
expect.assertions(1);

mocked(swr).default.mockReturnValue({
vi.mocked(swr).default.mockReturnValue({
data: undefined,
error: true,
isLoading: false,
Expand Down

0 comments on commit 2f4c376

Please sign in to comment.