Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion __tests__/app/api/farcaster.route.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const resetUrlGuardMocks = () => {
const loadRoute = async () => {
jest.resetModules();
resetUrlGuardMocks();
({ GET } = await import("../../../app/api/farcaster/route"));
({ GET } = await import("@/app/api/farcaster/route"));
};

describe("farcaster API route", () => {
Expand Down
12 changes: 6 additions & 6 deletions __tests__/app/api/open-graph.route.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jest.mock("next/server", () => ({
NextRequest: class {},
}));

jest.mock("../../../app/api/open-graph/utils", () => ({
jest.mock("@/app/api/open-graph/utils", () => ({
buildResponse: jest.fn(),
buildGoogleWorkspaceResponse: jest.fn(),
HTML_ACCEPT_HEADER:
Expand All @@ -40,7 +40,7 @@ jest.mock("@/lib/security/urlGuard", () => {
};
});

jest.mock("../../../app/api/open-graph/compound/service", () => ({
jest.mock("@/app/api/open-graph/compound/service", () => ({
createCompoundPlan: jest.fn(() => null),
}));

Expand All @@ -49,7 +49,7 @@ jest.mock("@/app/api/open-graph/ens", () => ({
fetchEnsPreview: jest.fn(),
}));

type GetHandler = typeof import("../../../app/api/open-graph/route").GET;
type GetHandler = typeof import("@/app/api/open-graph/route").GET;
let GET: GetHandler;

let utils: {
Expand Down Expand Up @@ -78,9 +78,9 @@ const mockFetch = jest.fn();

async function loadRoute(): Promise<void> {
jest.resetModules();
({ GET } = await import("../../../app/api/open-graph/route"));
({ GET } = await import("@/app/api/open-graph/route"));
({ UrlGuardError } = jest.requireActual("@/lib/security/urlGuard"));
utils = jest.requireMock("../../../app/api/open-graph/utils") as {
utils = jest.requireMock("@/app/api/open-graph/utils") as {
buildResponse: jest.Mock;
buildGoogleWorkspaceResponse: jest.Mock;
};
Expand All @@ -90,7 +90,7 @@ async function loadRoute(): Promise<void> {
fetchPublicUrl: jest.Mock;
};
compound = jest.requireMock(
"../../../app/api/open-graph/compound/service"
"@/app/api/open-graph/compound/service"
) as {
createCompoundPlan: jest.Mock;
};
Expand Down
2 changes: 1 addition & 1 deletion __tests__/app/api/open-graph.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jest.mock("node:dns/promises", () => ({
import {
buildGoogleWorkspaceResponse,
buildResponse,
} from "../../../app/api/open-graph/utils";
} from "@/app/api/open-graph/utils";
import { assertPublicUrl } from "@/lib/security/urlGuard";

const { lookup } = require("node:dns/promises") as {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/category/news/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import NewsPage from '@/app/category/news/page';

jest.mock('../../../../components/header/Header', () => () => <div data-testid="header">Header</div>);
jest.mock('../../../../components/header/HeaderPlaceholder', () => () => <div data-testid="header-placeholder">Header Placeholder</div>);
jest.mock('@/components/header/Header', () => () => <div data-testid="header">Header</div>);
jest.mock('@/components/header/HeaderPlaceholder', () => () => <div data-testid="header-placeholder">Header Placeholder</div>);

describe('NewsPage', () => {
const renderComponent = () => render(<NewsPage />);
Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/education/podcasts/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { render } from '@testing-library/react';
import PodcastsPage from '@/app/education/podcasts/page';

// Mock the Header component since it's dynamically imported
jest.mock('../../../../components/header/Header', () => {
jest.mock('@/components/header/Header', () => {
return function MockHeader() {
return <div data-testid="header">Header</div>;
};
});

// Mock HeaderPlaceholder
jest.mock('../../../../components/header/HeaderPlaceholder', () => {
jest.mock('@/components/header/HeaderPlaceholder', () => {
return function MockHeaderPlaceholder() {
return <div data-testid="header-placeholder">Header Placeholder</div>;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import Page from "@/app/museum/6529-fund-szn1/act-of-kindness/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import Page from "@/app/museum/6529-fund-szn1/capsule-house/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-fund-szn1/clonex/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import Page from "@/app/museum/6529-fund-szn1/clonex/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import CryptoCubesPage from "@/app/museum/6529-fund-szn1/cryptocubes/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { render, screen } from "@testing-library/react";
import CryptoPunksPage from "@/app/museum/6529-fund-szn1/cryptopunks/page";

// Mock the Header component since it's dynamically imported
jest.mock("../../../../../components/header/Header", () => {
jest.mock("@/components/header/Header", () => {
return function MockHeader() {
return <div data-testid="header">Header</div>;
};
});

// Mock HeaderPlaceholder
jest.mock("../../../../../components/header/HeaderPlaceholder", () => {
jest.mock("@/components/header/HeaderPlaceholder", () => {
return function MockHeaderPlaceholder() {
return <div data-testid="header-placeholder">Header Placeholder</div>;
};
Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-fund-szn1/faraway/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import FarawayPage from "@/app/museum/6529-fund-szn1/faraway/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-fund-szn1/fidenza/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import FidenzaPage from "@/app/museum/6529-fund-szn1/fidenza/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-fund-szn1/genesis/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { render, screen } from "@testing-library/react";
import GenesisPage from "@/app/museum/6529-fund-szn1/genesis/page";

// Mock the Header component since it's dynamically imported
jest.mock("../../../../../components/header/Header", () => {
jest.mock("@/components/header/Header", () => {
return function MockHeader() {
return <div data-testid="header">Header</div>;
};
});

// Mock HeaderPlaceholder
jest.mock("../../../../../components/header/HeaderPlaceholder", () => {
jest.mock("@/components/header/HeaderPlaceholder", () => {
return function MockHeaderPlaceholder() {
return <div data-testid="header-placeholder">Header Placeholder</div>;
};
Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-fund-szn1/grifters/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import Page from "@/app/museum/6529-fund-szn1/grifters/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import Page from "@/app/museum/6529-fund-szn1/incomplete-control/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-fund-szn1/madhouse/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import MadhousePage from "@/app/museum/6529-fund-szn1/madhouse/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-fund-szn1/meridian/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import MeridianPage from "@/app/museum/6529-fund-szn1/meridian/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-fund-szn1/non-either/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import NonEitherPage from "@/app/museum/6529-fund-szn1/non-either/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import NuclearNerdsPage from "@/app/museum/6529-fund-szn1/nuclear-nerds/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-fund-szn1/ringers/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import Page from "@/app/museum/6529-fund-szn1/ringers/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-fund-szn1/subscapes/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import SubscapesPage from "@/app/museum/6529-fund-szn1/subscapes/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import VansPage from "@/app/museum/6529-fund-szn1/where-my-vans-go/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/6529-general-assembly/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import Page from "@/app/museum/6529-general-assembly/page";

jest.mock("../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import Page from "@/app/museum/6529-gradient-collector-curated/page";

jest.mock("../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/bharat-krymo-museum-2/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import BharatKrymoMuseum2Page from "@/app/museum/bharat-krymo-museum-2/page";

jest.mock("../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/bharat-krymo-museum-3/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import Page from "@/app/museum/bharat-krymo-museum-3/page";

jest.mock("../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
4 changes: 2 additions & 2 deletions __tests__/app/museum/genesis/apparitions/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { render, screen } from "@testing-library/react";
import Page from "@/app/museum/genesis/apparitions/page";

jest.mock("../../../../../components/header/Header", () => () => (
jest.mock("@/components/header/Header", () => () => (
<div data-testid="header">Header</div>
));
jest.mock("../../../../../components/header/HeaderPlaceholder", () => () => (
jest.mock("@/components/header/HeaderPlaceholder", () => () => (
<div data-testid="header-placeholder">Header Placeholder</div>
));

Expand Down
Loading
Loading