Bump deps, update tests (#728)

* Bump deps, update tests

* Update stale.yml

* void handlers
This commit is contained in:
Jaco
2021-05-29 10:34:51 +02:00
committed by GitHub
parent 3ed90ae23a
commit fb7dfb3ddc
18 changed files with 1127 additions and 1203 deletions
@@ -3,6 +3,8 @@
import '../../../../__mocks__/chrome';
import type { KeyringPair$Json } from '@polkadot/keyring/types';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import { configure, mount, ReactWrapper } from 'enzyme';
import React from 'react';
@@ -10,8 +12,6 @@ import { act } from 'react-dom/test-utils';
import { MemoryRouter, Route } from 'react-router';
import { ThemeProvider } from 'styled-components';
import { KeyringPair$Json } from '@polkadot/keyring/types';
import { Button, themes } from '../components';
import * as messaging from '../messaging';
import { flushAllPromises } from '../testHelpers';
+4
View File
@@ -1,6 +1,10 @@
// Copyright 2019-2021 @polkadot/extension-ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
function setImmediate (fn: () => void): void {
setTimeout(fn, 0);
}
export function flushAllPromises (): Promise<void> {
return new Promise((resolve) => setImmediate(resolve));
}