Skip to content

Commit

Permalink
fix: fix context class
Browse files Browse the repository at this point in the history
  • Loading branch information
shuffledex committed Feb 19, 2020
1 parent c1dfe55 commit 4f12a0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/utils/__tests__/index.ts
@@ -1,10 +1,10 @@
import * as createTypeModule from '@polymathnetwork/polkadot/types/create/createType';
import * as registryModule from '@polymathnetwork/polkadot/types/create/registry';
import { Balance, IdentityId } from '@polymathnetwork/polkadot/types/interfaces';
import sinon from 'sinon';
import sinon, { SinonStub } from 'sinon';
import { ImportMock, MockManager, StaticMockManager } from 'ts-mock-imports';

import * as contextModule from '~/Context';
import * as contextModule from '~/base/Context';
import {
balanceToNumber,
delay,
Expand Down Expand Up @@ -73,8 +73,7 @@ describe('serialize and unserialize', () => {
describe('stringToIdentityId and identityIdToString', () => {
let mockContext: StaticMockManager<contextModule.Context>;
let mockRegistry: MockManager<registryModule.TypeRegistry>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let mockCreateType: sinon.SinonStub<any[], any>;
let mockCreateType: SinonStub;

beforeEach(() => {
mockContext = ImportMock.mockStaticClass(contextModule, 'Context');
Expand Down Expand Up @@ -113,8 +112,7 @@ describe('stringToIdentityId and identityIdToString', () => {
describe('numberToBalance and balanceToNumber', () => {
let mockContext: StaticMockManager<contextModule.Context>;
let mockRegistry: MockManager<registryModule.TypeRegistry>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let mockCreateType: sinon.SinonStub<any[], any>;
let mockCreateType: SinonStub;

beforeEach(() => {
mockContext = ImportMock.mockStaticClass(contextModule, 'Context');
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Expand Up @@ -2,7 +2,7 @@ import { createType } from '@polymathnetwork/polkadot/types/create/createType';
import { Balance, IdentityId } from '@polymathnetwork/polkadot/types/interfaces';
import stringify from 'json-stable-stringify';

import { Context } from '~/Context';
import { Context } from '~/base/Context';

/**
* Promisified version of a timeout
Expand Down

0 comments on commit 4f12a0f

Please sign in to comment.