Skip to content

Commit

Permalink
Merge pull request #73 from PolymathNetwork/fix/MSDK-107-createtype-r…
Browse files Browse the repository at this point in the history
…efactor

Fix/msdk 107 createtype refactor
  • Loading branch information
monitz87 authored Apr 20, 2020
2 parents c8df0c8 + dbb372e commit 4dfa2ec
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 212 deletions.
9 changes: 9 additions & 0 deletions src/testUtils/mocks/polkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ function initTx(): void {
*/
function initApi(): void {
mockInstanceContainer.apiInstance.registry = ('registry' as unknown) as Registry;
mockInstanceContainer.apiInstance.createType = sinon.stub();

initTx();
initQuery();
Expand Down Expand Up @@ -696,6 +697,14 @@ export function getApiInstance(): ApiPromise & EventEmitter {
return mockInstanceContainer.apiInstance as ApiPromise & EventEmitter;
}

/**
* @hidden
* Retrieve the stub of the createType method
*/
export function getCreateTypeStub(): SinonStub {
return mockInstanceContainer.apiInstance.createType as SinonStub;
}

/**
* @hidden
* Retrieve an instance of the mocked Context
Expand Down
Loading

0 comments on commit 4dfa2ec

Please sign in to comment.