Skip to content

Commit

Permalink
Merge pull request #231 from hypercerts-org/fix/restore_test_suites
Browse files Browse the repository at this point in the history
Restore unit test suites
  • Loading branch information
bitbeckers authored Dec 23, 2024
2 parents 34d1818 + a27e984 commit 298712c
Show file tree
Hide file tree
Showing 16 changed files with 117 additions and 403 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci-test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:
environment: test

env:
ENVIRONMENT: "test"
LOCAL_CACHING_DB_URL: "postgresql://localhost/postgres"
DB_URL: "postgresql://postgres:[email protected]:54322/postgres"
PORT: ${{ vars.PORT }}
CHAIN_ID: ${{ vars.CHAIN_ID }}
BATCH_SIZE: ${{ vars.BATCH_SIZE }}
Expand Down
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
Loading

0 comments on commit 298712c

Please sign in to comment.