MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / assertBlock

Function assertBlock

src.ts/_tests/test-providers-data.ts:132–148  ·  view source on GitHub ↗
(actual: any, expected: any)

Source from the content-addressed store, hash-verified

130}
131
132function assertBlock(actual: any, expected: any): void {
133 // Check transactions
134 for (let i = 0; i < expected.transactions.length; i++) {
135 const expectedTx = expected.transactions[i];
136 if (typeof(expectedTx) === "string") {
137 assert.equal(actual.transactions[i], expectedTx, `block.transactions[${ i }]`);
138 } else {
139 throw new Error("@TODO");
140 }
141 }
142
143 // Remove the transactions and test keys
144 expected = Object.assign({ }, expected, { transactions: undefined, test: undefined });
145
146 // Check remaining keys
147 assertObj("block", actual, expected);
148}
149
150function assertTransaction(actual: any, expected: any): void {
151 // @TODO: Accesslist

Callers 1

Calls 1

assertObjFunction · 0.70

Tested by

no test coverage detected