Skip to content

Commit

Permalink
Update test types
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed May 3, 2021
1 parent c9e6f3b commit 76f828c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe("get proposers api impl", function () {
logger,
network: server.networkStub,
sync: syncStub,
metrics: null,
};
api = new ValidatorApi({}, modules);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe("api - validator - produceAttestationData", function () {
logger,
network: server.networkStub,
sync: syncStub,
metrics: null,
};
});

Expand Down
2 changes: 1 addition & 1 deletion packages/lodestar/test/unit/chain/blocks/process.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {createStubInstance} from "../../../utils/types";

describe("processBlock", function () {
const emitter = new ChainEventEmitter();
const metrics = undefined;
const metrics = null;
let forkChoice: SinonStubbedInstance<ForkChoice>;
let checkpointStateCache: SinonStubbedInstance<CheckpointStateCache> & CheckpointStateCache;
let regen: SinonStubbedInstance<StateRegenerator>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ describe("block assembly", function () {
const eth1 = sandbox.createStubInstance(Eth1ForBlockProduction);
eth1.getEth1DataAndDeposits.resolves({eth1Data: state.eth1Data, deposits: []});

const result = await assembleBlock({config, chain: chainStub, db: beaconDB, eth1}, 1, Buffer.alloc(96, 0));
const result = await assembleBlock(
{config, chain: chainStub, db: beaconDB, eth1, metrics: null},
1,
Buffer.alloc(96, 0)
);
expect(result).to.not.be.null;
expect(result.slot).to.equal(1);
expect(result.proposerIndex).to.equal(2);
Expand Down
1 change: 1 addition & 0 deletions packages/lodestar/test/utils/mocks/chain/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export class MockBeaconChain implements IBeaconChain {
stateCache: this.stateCache,
checkpointStateCache: this.checkpointStateCache,
db: new StubbedBeaconDb(sinon),
metrics: null,
});
this.forkDigestContext = new ForkDigestContext(this.config, this.genesisValidatorsRoot);
}
Expand Down

0 comments on commit 76f828c

Please sign in to comment.