Remove unused global.crypto from tests

This commit is contained in:
Tankred Hase 2020-05-02 06:41:18 +08:00
parent f594e2bb3a
commit 9c5321b622
No known key found for this signature in database
GPG key ID: 8A9F1C42BFB264F6
7 changed files with 0 additions and 7 deletions

View file

@ -4,7 +4,6 @@ import TestRenderer from 'react-test-renderer';
import Settings from '../../screen/settings/settings';
import Selftest from '../../screen/selftest';
import { BlueHeader } from '../../BlueComponents';
global.crypto = require('crypto'); // shall be used by tests under nodejs CLI, but not in RN environment
let assert = require('assert');
jest.mock('react-native-qrcode-svg', () => 'Video');
jest.useFakeTimers();

View file

@ -1,7 +1,6 @@
/* global it, describe, jasmine, afterAll, beforeAll */
import { HDSegwitBech32Wallet, SegwitP2SHWallet, HDSegwitBech32Transaction, SegwitBech32Wallet } from '../../class';
const bitcoin = require('bitcoinjs-lib');
global.crypto = require('crypto'); // shall be used by tests under nodejs CLI, but not in RN environment
let assert = require('assert');
global.net = require('net'); // needed by Electrum client. For RN it is proviced in shim.js
global.tls = require('tls'); // needed by Electrum client. For RN it is proviced in shim.js

View file

@ -1,6 +1,5 @@
/* global it, describe, jasmine, afterAll, beforeAll */
import { HDSegwitBech32Wallet } from '../../class';
global.crypto = require('crypto'); // shall be used by tests under nodejs CLI, but not in RN environment
let assert = require('assert');
global.net = require('net'); // needed by Electrum client. For RN it is proviced in shim.js
global.tls = require('tls'); // needed by Electrum client. For RN it is proviced in shim.js

View file

@ -1,7 +1,6 @@
/* global it, jasmine, afterAll, beforeAll */
import { HDSegwitP2SHWallet } from '../../class';
const bitcoin = require('bitcoinjs-lib');
global.crypto = require('crypto'); // shall be used by tests under nodejs CLI, but not in RN environment
let assert = require('assert');
global.net = require('net'); // needed by Electrum client. For RN it is proviced in shim.js
global.tls = require('tls'); // needed by Electrum client. For RN it is proviced in shim.js

View file

@ -1,7 +1,6 @@
/* global it */
import { SegwitP2SHWallet, AppStorage } from '../../class';
import AsyncStorage from '@react-native-community/async-storage';
global.crypto = require('crypto'); // shall be used by tests under nodejs CLI, but not in RN environment
let assert = require('assert');
it('Appstorage - loadFromDisk works', async () => {

View file

@ -1,6 +1,5 @@
/* global it, describe */
import { HDSegwitBech32Wallet } from '../../class';
global.crypto = require('crypto'); // shall be used by tests under nodejs CLI, but not in RN environment
let assert = require('assert');
describe('Bech32 Segwit HD (BIP84)', () => {

View file

@ -1,6 +1,5 @@
/* global it */
import { SegwitP2SHWallet, SegwitBech32Wallet, HDSegwitP2SHWallet, HDLegacyP2PKHWallet, LegacyWallet } from '../../class';
global.crypto = require('crypto'); // shall be used by tests under nodejs CLI, but not in RN environment
let assert = require('assert');
it('can create a Segwit HD (BIP49)', async function() {