Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shuffledex committed Jul 24, 2020
1 parent 9f6eef3 commit b029afe
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/Governance.ts
Expand Up @@ -61,7 +61,7 @@ describe('Governance class', () => {
const fakeResult = [new Proposal({ pipId }, context)];
const proposalsQueryResponse: MiddlewareProposal[] = [
{
pipId: pipId,
pipId,
proposer: proposerDid,
createdAt,
url: 'http://someUrl',
Expand Down
2 changes: 0 additions & 2 deletions src/api/entities/Proposal/__tests__/index.ts
@@ -1,5 +1,3 @@
import BigNumber from 'bignumber.js';

import { Entity } from '~/base';
import { Context } from '~/context';
import { dsMockUtils } from '~/testUtils/mocks';
Expand Down
2 changes: 0 additions & 2 deletions src/api/entities/Proposal/index.ts
@@ -1,5 +1,3 @@
import BigNumber from 'bignumber.js';

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

Expand Down
6 changes: 3 additions & 3 deletions src/api/procedures/__tests__/createProposal.ts
Expand Up @@ -185,11 +185,11 @@ describe('createProposal procedure', () => {

describe('createPrroposalResolver', () => {
const findEventRecordStub = sinon.stub(utilsModule, 'findEventRecord');
const pipId = new BigNumber(1);
const rawPipId = dsMockUtils.createMockU32(pipId.toNumber());
const pipId = 1;
const rawPipId = dsMockUtils.createMockU32(pipId);

beforeAll(() => {
entityMockUtils.initMocks({ proposalOptions: { pipId: new BigNumber(pipId) } });
entityMockUtils.initMocks({ proposalOptions: { pipId } });
});

beforeEach(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/testUtils/mocks/entities.ts
Expand Up @@ -65,7 +65,7 @@ interface AuthorizationRequestOptions {
}

interface ProposalOptions {
pipId?: BigNumber;
pipId?: number;
}

let identityConstructorStub: SinonStub;
Expand Down Expand Up @@ -192,7 +192,7 @@ const defaultAuthorizationRequestOptions: AuthorizationRequestOptions = {
};
let authorizationRequestOptions = defaultAuthorizationRequestOptions;
const defaultProposalOptions: ProposalOptions = {
pipId: new BigNumber(1),
pipId: 1,
};
let proposalOptions = defaultProposalOptions;

Expand Down

0 comments on commit b029afe

Please sign in to comment.