mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
Mock random.js in tests using node crypto
This commit is contained in:
parent
52a8f530c6
commit
dbf07544cf
@ -1,3 +1,12 @@
|
|||||||
|
import crypto from 'crypto';
|
||||||
|
import { promisify } from 'util';
|
||||||
|
|
||||||
|
jest.mock('../random', () => {
|
||||||
|
return {
|
||||||
|
randomBytes: jest.fn(size => promisify(crypto.randomBytes)(size)),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
jest.mock('react-native-watch-connectivity', () => {
|
jest.mock('react-native-watch-connectivity', () => {
|
||||||
return {
|
return {
|
||||||
getIsWatchAppInstalled: jest.fn(),
|
getIsWatchAppInstalled: jest.fn(),
|
||||||
|
Loading…
Reference in New Issue
Block a user