Skip to content

Commit

Permalink
tests: fix finality tests, run CI tests on pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
kev1n-peters committed Aug 27, 2024
1 parent 9abeccd commit 08582bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Node.js CI
on: [push]
on:
workflow_dispatch:
pull_request:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
6 changes: 3 additions & 3 deletions core/base/__tests__/finality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import {
ConsistencyLevels,
finalityThreshold,
consistencyLevelToBlock,
} from '../src/constants/finality.js';
} from "../src/constants/finality.js";

describe("Finality tests", function () {
test("Receive expected number of rounds", () => {
expect(finalityThreshold("Ethereum")).toEqual(64);
expect(finalityThreshold("Ethereum")).toEqual(96);
expect(finalityThreshold("Algorand")).toEqual(0);
expect(finalityThreshold("Solana")).toEqual(32);
});
Expand Down Expand Up @@ -41,7 +41,7 @@ describe("Finality tests", function () {
test("Estimates rounds from finalized consistency level", () => {
// 100 + (# final rounds)
expect(consistencyLevelToBlock("Ethereum", ConsistencyLevels.Finalized, fromBlock)).toEqual(
fromBlock + 64n,
fromBlock + 96n,
);
expect(consistencyLevelToBlock("Solana", ConsistencyLevels.Finalized, fromBlock)).toEqual(
fromBlock + 32n,
Expand Down

0 comments on commit 08582bd

Please sign in to comment.