Files
api/packages/api-rx/src/index.spec.js
T
Jaco Greeff 432f9a73a9 TypeScript conversion (#101)
* Auto-conversion

* ES6 import/export

* WIP...

* WIP...

* And... we are TS typed, some good, some bad, some better, some worse

* Tests passing
2018-06-23 13:39:31 +02:00

23 lines
643 B
JavaScript

// Copyright 2017-2018 @polkadot/api-rx authors & contributors
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
jest.mock('@polkadot/api-provider/ws', () => () => ({
isConnected: () => true,
on: () => true,
send: () => true
}));
jest.mock('./interface', () => (api, sectionName) => sectionName);
const createApi = require('./index').default;
describe('createApi', () => {
it('creates an instance with all sections', () => {
expect(
Object.keys(createApi())
).toEqual([
'isConnected', 'author', 'chain', 'state', 'system'
]);
});
});