Skip to content

Commit 298712c

Browse files
authored
Merge pull request #231 from hypercerts-org/fix/restore_test_suites
Restore unit test suites
2 parents 34d1818 + a27e984 commit 298712c

16 files changed

+117
-403
lines changed

.github/workflows/ci-test-unit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88
environment: test
99

1010
env:
11+
ENVIRONMENT: "test"
12+
LOCAL_CACHING_DB_URL: "postgresql://localhost/postgres"
13+
DB_URL: "postgresql://postgres:postgres@127.0.0.1:54322/postgres"
1114
PORT: ${{ vars.PORT }}
1215
CHAIN_ID: ${{ vars.CHAIN_ID }}
1316
BATCH_SIZE: ${{ vars.BATCH_SIZE }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Indexing service for the hypercerts ecosystem",
55
"main": "dist/server.js",
66
"engines": {
7-
"node": "20.x"
7+
"node": "22.x"
88
},
99
"scripts": {
1010
"dev": "nodemon",

test/monitoring/eas.test.ts

Lines changed: 0 additions & 148 deletions
This file was deleted.

test/monitoring/hypercerts.test.ts

Lines changed: 0 additions & 150 deletions
This file was deleted.

test/parsing/attestationData.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import { expect, it, beforeEach, describe } from "vitest";
22
import { parseAttestationData } from "../../src/parsing/parseAttestationData.js";
3-
import { Tables } from "@/types/database.types.js";
43
import { faker } from "@faker-js/faker";
54
import { Address, getAddress } from "viem";
6-
import { chainId } from "@/utils/constants.js";
75
import {
86
generateEasAttestation,
97
generateParsedAttestedEvent,
108
generateSupportedSchema,
119
} from "../helpers/factories.js";
1210
import { EasAttestation } from "../../src/parsing/parseAttestedEvent.js";
11+
import { Tables } from "../../src/types/database.types.js";
1312

1413
describe("decodeAttestationData", () => {
14+
const chainId = 11155111;
15+
1516
let attester: Address;
1617
let recipient: Address;
1718
let event;

test/parsing/attestedEvent.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { describe, vi, beforeEach, it, expect } from "vitest";
33
import { getAddress } from "viem";
44
import { faker } from "@faker-js/faker";
55
import { Block } from "@hypercerts-org/chainsauce";
6-
import { chainId } from "../../src/utils/constants.js";
6+
import { getEvmClient } from "../../src/clients/evmClient.js";
77

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

1919
describe("parseAttestedEvent", () => {
20+
const chainId = 11155111;
21+
const client = getEvmClient(chainId);
22+
2023
const block: Block = {
2124
chainId,
2225
blockNumber: faker.number.bigInt(),

0 commit comments

Comments
 (0)