Skip to content

Commit

Permalink
fixes/lint
Browse files Browse the repository at this point in the history
  • Loading branch information
codenamejason committed Jun 24, 2024
1 parent d4021e4 commit 24d92ba
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,6 @@ describe("<ReadProgramProvider />", () => {
// );
// };

function renderWithProvider(ui: JSX.Element) {
render(<ReadProgramProvider>{ui}</ReadProgramProvider>);
}
// function renderWithProvider(ui: JSX.Element) {
// render(<ReadProgramProvider>{ui}</ReadProgramProvider>);
// }
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { faker } from "@faker-js/faker";
// ROUND_PAYOUT_MERKLE_OLD as ROUND_PAYOUT_MERKLE,
// formatLocalDateAsISOString,
// } from "common";
import {
makeProgramData,
// makeRoundData,
// wrapWithReadProgramContext,
// wrapWithRoundContext,
} from "../../../test-utils";
import { Program } from "../../api/types";
// import {
// makeProgramData,
// makeRoundData,
// wrapWithReadProgramContext,
// wrapWithRoundContext,
// } from "../../../test-utils";
// import { Program } from "../../api/types";
// import { useWallet } from "../../common/Auth";
// import ViewProgram from "../ViewProgramPage";

Expand Down Expand Up @@ -62,24 +62,24 @@ jest.mock("../../../app/wagmi", () => ({
// }));

describe("<ViewProgram />", () => {
let stubProgram: Program;
// let stubProgram: Program;

beforeEach(() => {
jest.clearAllMocks();

stubProgram = makeProgramData({
id: programId,
chain: { id: 1 },
tags: ["allo-v2"],
operatorWallets: [mockedOperatorWallet],
roles: [
{
address: mockedOperatorWallet,
role: "OWNER",
createdAtBlock: "0",
},
],
});
// stubProgram = makeProgramData({
// id: programId,
// chain: { id: 1 },
// tags: ["allo-v2"],
// operatorWallets: [mockedOperatorWallet],
// roles: [
// {
// address: mockedOperatorWallet,
// role: "OWNER",
// createdAtBlock: "0",
// },
// ],
// });
});

it("should display NotFoundPage when no program is found", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import {
ROUND_PAYOUT_DIRECT_OLD as ROUND_PAYOUT_DIRECT,
} from "common";

// import { Connector } from "wagmi";
import { BigNumber, ethers } from "ethers";
import { Erc20__factory } from "../../../types/generated/typechain";
import moment from "moment";
import { parseUnits } from "ethers/lib/utils.js";
import { usePayout } from "../../../context/application/usePayout";
import { usePayouts } from "../usePayouts";
import { DataLayer, DataLayerContext } from "data-layer";
import { Connector } from "wagmi";
// import { getEthersSigner } from "../../../app/wagmi";

jest.mock("../../../types/generated/typechain");
Expand All @@ -35,23 +35,23 @@ jest.mock("@rainbow-me/rainbowkit", () => ({
}));

const mockAddress = ethers.constants.AddressZero;
const mockWallet = {
provider: {
network: {
chainId: 1,
},
},
address: mockAddress,
signer: {
getChainId: () => {
/* do nothing */
},
},
chain: {
name: "abc",
id: 1,
},
};
// const mockWallet = {
// provider: {
// network: {
// chainId: 1,
// },
// },
// address: mockAddress,
// signer: {
// getChainId: () => {
// /* do nothing */
// },
// },
// chain: {
// name: "abc",
// id: 1,
// },
// };
// const mockNetwork = {
// chain: {
// blockExplorers: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,24 @@ jest.mock("../../../constants", () => ({
errorModalDelayMs: 0, // NB: use smaller delay for faster tests
}));

const mockAddress = "0x0";
const mockWallet = {
provider: {
network: {
chainId: 1,
},
},
address: mockAddress,
signer: {
getChainId: () => {
/* do nothing */
},
},
chain: {
name: "abc",
id: 1,
},
};
// const mockAddress = "0x0";
// const mockWallet = {
// provider: {
// network: {
// chainId: 1,
// },
// },
// address: mockAddress,
// signer: {
// getChainId: () => {
// /* do nothing */
// },
// },
// chain: {
// name: "abc",
// id: 1,
// },
// };

// const mockNetwork = {
// chain: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */

import { render, screen } from "@testing-library/react";
// import { render, screen } from "@testing-library/react";
import { useParams } from "react-router-dom";
import {
makeDirectGrantRoundData,
makeGrantApplicationData,
// makeDirectGrantRoundData,
// makeGrantApplicationData,
makeRoundData,
wrapWithBulkUpdateGrantApplicationContext,
wrapWithReadProgramContext,
wrapWithRoundContext,
// wrapWithBulkUpdateGrantApplicationContext,
// wrapWithReadProgramContext,
// wrapWithRoundContext,
} from "../../../test-utils";
import { Round, ProgressStatus } from "../../api/types";
import { Round } from "../../api/types";
import { useApplicationsByRoundId } from "../../common/useApplicationsByRoundId";
import ViewRoundPage from "../ViewRoundPage";
// import ViewRoundPage from "../ViewRoundPage";

const mockRoundData: Round = makeRoundData();

Expand Down

0 comments on commit 24d92ba

Please sign in to comment.