Skip to content

Commit 007f61b

Browse files
authored
tests: fix finality tests, run CI tests on pull requests (#682)
1 parent 0275091 commit 007f61b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/build.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Node.js CI
2-
on: [push]
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
38

49
concurrency:
510
group: ${{ github.workflow }}-${{ github.ref }}

core/base/__tests__/finality.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import {
33
ConsistencyLevels,
44
finalityThreshold,
55
consistencyLevelToBlock,
6-
} from '../src/constants/finality.js';
6+
} from "../src/constants/finality.js";
77

88
describe("Finality tests", function () {
99
test("Receive expected number of rounds", () => {
10-
expect(finalityThreshold("Ethereum")).toEqual(64);
10+
expect(finalityThreshold("Ethereum")).toEqual(96);
1111
expect(finalityThreshold("Algorand")).toEqual(0);
1212
expect(finalityThreshold("Solana")).toEqual(32);
1313
});
@@ -41,7 +41,7 @@ describe("Finality tests", function () {
4141
test("Estimates rounds from finalized consistency level", () => {
4242
// 100 + (# final rounds)
4343
expect(consistencyLevelToBlock("Ethereum", ConsistencyLevels.Finalized, fromBlock)).toEqual(
44-
fromBlock + 64n,
44+
fromBlock + 96n,
4545
);
4646
expect(consistencyLevelToBlock("Solana", ConsistencyLevels.Finalized, fromBlock)).toEqual(
4747
fromBlock + 32n,

0 commit comments

Comments
 (0)