Files
api/packages/api-contract/src/Abi.spec.ts
T
Keith Ingram cf01c41b33 Contract API for Rx/promises (#1520)
* wip with rxjs/promise

* add outcome process

* contract call decoding solved

* restore messages as dict, cleanup

* linting

* linting

* type fixes
2019-10-31 19:47:14 +02:00

24 lines
661 B
TypeScript

// Copyright 2017-2019 @polkadot/api-contract authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import incrementerAbi from '../test/contracts/incrementer.json';
import { Abi } from '.';
describe('Abi', (): void => {
describe('incrementer', (): void => {
let abi: Abi;
beforeEach((): void => {
abi = new Abi(incrementerAbi);
});
it('has the attached methods', (): void => {
expect(Object.values(abi.abi.contract.messages).map(({ name }): string => name)).toEqual(
['inc', 'get', 'compare']
);
});
});
});