Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore unit test suites #231

Merged
merged 15 commits into from
Dec 23, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:postgres@127.0.0.1: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
Loading