mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
tendermint-rpc: Update tests for block meta
This commit is contained in:
parent
230ae04dd3
commit
0f78af8ef0
@ -275,19 +275,18 @@ function defaultTestSuite(rpcFactory: () => RpcClient, expected: ExpectedValues)
|
||||
expect(blockchain.blockMetas.length).toBeGreaterThanOrEqual(1);
|
||||
const meta = blockchain.blockMetas[0];
|
||||
|
||||
// TODO: check all the fields
|
||||
expect(meta).toEqual({
|
||||
blockId: jasmine.objectContaining({}),
|
||||
// block_size: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
// num_txs: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
header: jasmine.objectContaining({
|
||||
expect(meta.blockId).toEqual(jasmine.objectContaining({}));
|
||||
expect(meta.blockSize).toBeInstanceOf(Number);
|
||||
expect(meta.header).toEqual(
|
||||
jasmine.objectContaining({
|
||||
version: {
|
||||
block: expected.blockVersion,
|
||||
app: expected.appVersion,
|
||||
},
|
||||
chainId: jasmine.stringMatching(chainIdMatcher),
|
||||
}),
|
||||
});
|
||||
);
|
||||
expect(meta.numTxs).toBeInstanceOf(Number);
|
||||
|
||||
client.disconnect();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user