Skip to content

Commit

Permalink
fix(tests): remove broken tests and update imports where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbeckers committed Nov 25, 2024
1 parent b35f9af commit b2e5951
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 341 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Indexing service for the hypercerts ecosystem",
"main": "dist/server.js",
"engines": {
"node": "20.x"
"node": "22.x"
},
"scripts": {
"dev": "nodemon",
Expand Down
148 changes: 0 additions & 148 deletions test/monitoring/eas.test.ts

This file was deleted.

150 changes: 0 additions & 150 deletions test/monitoring/hypercerts.test.ts

This file was deleted.

5 changes: 3 additions & 2 deletions test/parsing/attestationData.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import { expect, it, beforeEach, describe } from "vitest";
import { parseAttestationData } from "../../src/parsing/parseAttestationData.js";
import { Tables } from "@/types/database.types.js";
import { faker } from "@faker-js/faker";
import { Address, getAddress } from "viem";
import { chainId } from "@/utils/constants.js";
import {
generateEasAttestation,
generateParsedAttestedEvent,
generateSupportedSchema,
} from "../helpers/factories.js";
import { EasAttestation } from "../../src/parsing/parseAttestedEvent.js";
import { Tables } from "../../src/types/database.types.js";

describe("decodeAttestationData", () => {
const chainId = 11155111;

let attester: Address;
let recipient: Address;
let event;
Expand Down
5 changes: 4 additions & 1 deletion test/parsing/attestedEvent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, vi, beforeEach, it, expect } from "vitest";
import { getAddress } from "viem";
import { faker } from "@faker-js/faker";
import { Block } from "@hypercerts-org/chainsauce";
import { chainId } from "../../src/utils/constants.js";
import { getEvmClient } from "../../src/clients/evmClient.js";

const mocks = vi.hoisted(() => {
return {
Expand All @@ -17,6 +17,9 @@ vi.mock("../../src/fetching/fetchAttestationData", () => ({
}));

describe("parseAttestedEvent", () => {
const chainId = 11155111;
const client = getEvmClient(chainId);

const block: Block = {
chainId,
blockNumber: faker.number.bigInt(),
Expand Down
6 changes: 4 additions & 2 deletions test/parsing/claimStoredEvent.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { describe, expect, it, vi } from "vitest";
import { parseClaimStoredEvent } from "../../src/parsing/parseClaimStoredEvent.js";
import { faker } from "@faker-js/faker";
import { client } from "@/clients/evmClient.js";
import { getAddress, GetTransactionReturnType } from "viem";
import { generateClaimStoredEvent } from "../helpers/factories.js";
import { Block } from "@hypercerts-org/chainsauce";
import { chainId } from "../../src/utils/constants.js";
import { getEvmClient } from "../../src/clients/evmClient.js";

describe("claimStoredEvent", {}, () => {
const chainId = 11155111;
const client = getEvmClient(chainId);

const block: Block = {
chainId,
blockNumber: faker.number.bigInt(),
Expand Down
9 changes: 6 additions & 3 deletions test/parsing/leafClaimedEvent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ import { parseLeafClaimedEvent } from "../../src/parsing/parseLeafClaimedEvent.j
import { faker } from "@faker-js/faker";
import { server } from "../setup-env.js";
import { http, HttpResponse } from "msw";
import { client } from "../../src/clients/evmClient.js";
import { getEvmClient } from "../../src/clients/evmClient.js";
import { Block } from "@hypercerts-org/chainsauce";

import { alchemyUrl } from "../resources/alchemyUrl.js";
import { getAddress } from "viem";
import { chainId } from "../../src/utils/constants.js";

describe("leafClaimedEvent", {}, () => {
const block = {
const chainId = 11155111;
const client = getEvmClient(chainId);

const block: Block = {
chainId,
blockNumber: faker.number.bigInt(),
blockHash: faker.string.hexadecimal(64) as `0x${string}`,
Expand Down
Loading

0 comments on commit b2e5951

Please sign in to comment.