fix: remove cache from api-derive (#779)
* Remove cache from api-derive * Skip e2e * Update headers to 2019
This commit is contained in:
committed by
Jaco Greeff
parent
a74367e924
commit
3e43bc5ea9
@@ -0,0 +1,32 @@
|
||||
// Copyright 2017-2019 @polkadot/api-derive 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 ApiPromise from '@polkadot/api/promise/Api';
|
||||
import { BlockNumber } from '@polkadot/types';
|
||||
import { WsProvider } from '@polkadot/rpc-provider';
|
||||
|
||||
const WS_LOCAL = 'ws://127.0.0.1:9944/';
|
||||
// const WS_POC3 = 'wss://poc3-rpc.polkadot.io/';
|
||||
|
||||
describe.skip('derive e2e', () => {
|
||||
let api: ApiPromise;
|
||||
|
||||
beforeAll(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
api = await ApiPromise.create(new WsProvider(WS_LOCAL));
|
||||
done();
|
||||
});
|
||||
|
||||
it('returns correct results', async () => {
|
||||
// https://github.com/polkadot-js/api/issues/777
|
||||
const block1 = await api.derive.chain.bestNumber();
|
||||
await new Promise((resolve) => setTimeout(resolve, 15000));
|
||||
const block2 = await api.derive.chain.bestNumber();
|
||||
|
||||
expect((block1 as BlockNumber).eq(block2)).toBe(false);
|
||||
});
|
||||
});
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2018 @polkadot/api-derive authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/api-derive authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
Reference in New Issue
Block a user