Fixing React Native tests.
This commit is contained in:
parent
1729f804fb
commit
f10977ab35
@ -21,15 +21,16 @@ import {
|
||||
} from 'react-native/Libraries/NewAppScreen';
|
||||
|
||||
|
||||
|
||||
// Inject the crpyot shims (BEFORE the ethers shims)
|
||||
import "./crypto-shims.js";
|
||||
// Inject the crypto shims (BEFORE the ethers shims)
|
||||
import "react-native-get-random-values";
|
||||
|
||||
// Inject the missing features with the ethers shims
|
||||
import "./libs/shims.js";
|
||||
//import "@ethersproject/shims";
|
||||
import "./libs/shims";
|
||||
|
||||
// Import ethers
|
||||
import { ethers } from "./libs/ethers.js";
|
||||
//import { ethers } from "ethers";
|
||||
import { ethers } from "./libs/ethers";
|
||||
|
||||
// Import the test framework
|
||||
import "./libs/mocha.js";
|
||||
|
@ -1,3 +0,0 @@
|
||||
try {
|
||||
require("get-random-values-polypony").polyfill();
|
||||
} catch (error) { };
|
@ -66,8 +66,6 @@ PODS:
|
||||
- boost-for-react-native
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- get-random-values-polypony (1.0.0):
|
||||
- React
|
||||
- glog (0.3.5)
|
||||
- OpenSSL-Universal (1.0.2.19):
|
||||
- OpenSSL-Universal/Static (= 1.0.2.19)
|
||||
@ -238,6 +236,8 @@ PODS:
|
||||
- React-cxxreact (= 0.63.2)
|
||||
- React-jsi (= 0.63.2)
|
||||
- React-jsinspector (0.63.2)
|
||||
- react-native-get-random-values (1.5.0):
|
||||
- React
|
||||
- React-RCTActionSheet (0.63.2):
|
||||
- React-Core/RCTActionSheetHeaders (= 0.63.2)
|
||||
- React-RCTAnimation (0.63.2):
|
||||
@ -326,7 +326,6 @@ DEPENDENCIES:
|
||||
- FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.41.1)
|
||||
- FlipperKit/SKIOSNetworkPlugin (~> 0.41.1)
|
||||
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
|
||||
- get-random-values-polypony (from `../node_modules/get-random-values-polypony`)
|
||||
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
||||
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
|
||||
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
|
||||
@ -340,6 +339,7 @@ DEPENDENCIES:
|
||||
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
|
||||
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
|
||||
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
|
||||
- react-native-get-random-values (from `../node_modules/react-native-get-random-values`)
|
||||
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
|
||||
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
|
||||
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
|
||||
@ -376,8 +376,6 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
|
||||
Folly:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
|
||||
get-random-values-polypony:
|
||||
:path: "../node_modules/get-random-values-polypony"
|
||||
glog:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
|
||||
RCTRequired:
|
||||
@ -400,6 +398,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/react-native/ReactCommon/jsiexecutor"
|
||||
React-jsinspector:
|
||||
:path: "../node_modules/react-native/ReactCommon/jsinspector"
|
||||
react-native-get-random-values:
|
||||
:path: "../node_modules/react-native-get-random-values"
|
||||
React-RCTActionSheet:
|
||||
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
|
||||
React-RCTAnimation:
|
||||
@ -438,7 +438,6 @@ SPEC CHECKSUMS:
|
||||
Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
|
||||
FlipperKit: bc68102cd4952a258a23c9c1b316c7bec1fecf83
|
||||
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
|
||||
get-random-values-polypony: 6caa66e41322297b72477ffe91201a06890fcf8a
|
||||
glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
|
||||
OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
|
||||
RCTRequired: f13f25e7b12f925f1f6a6a8c69d929a03c0129fe
|
||||
@ -451,6 +450,7 @@ SPEC CHECKSUMS:
|
||||
React-jsi: 54245e1d5f4b690dec614a73a3795964eeef13a8
|
||||
React-jsiexecutor: 8ca588cc921e70590820ce72b8789b02c67cce38
|
||||
React-jsinspector: b14e62ebe7a66e9231e9581279909f2fc3db6606
|
||||
react-native-get-random-values: 1404bd5cc0ab0e287f75ee1c489555688fc65f89
|
||||
React-RCTActionSheet: 910163b6b09685a35c4ebbc52b66d1bfbbe39fc5
|
||||
React-RCTAnimation: 9a883bbe1e9d2e158d4fb53765ed64c8dc2200c6
|
||||
React-RCTBlob: 39cf0ece1927996c4466510e25d2105f67010e13
|
||||
|
18
misc/ReactNativeTestApp/package-lock.json
generated
18
misc/ReactNativeTestApp/package-lock.json
generated
@ -4560,6 +4560,11 @@
|
||||
"time-stamp": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"fast-base64-decode": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-base64-decode/-/fast-base64-decode-1.0.0.tgz",
|
||||
"integrity": "sha512-qwaScUgUGBYeDNRnbc/KyllVU88Jk1pRHPStuF/lO7B0/RTRLj7U0lkdTAutlBblY08rwZDff6tNU9cjv6j//Q=="
|
||||
},
|
||||
"fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
@ -4848,11 +4853,6 @@
|
||||
"integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
|
||||
"dev": true
|
||||
},
|
||||
"get-random-values-polypony": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-random-values-polypony/-/get-random-values-polypony-1.0.0.tgz",
|
||||
"integrity": "sha512-UtDFXSNnVWkocN5Rbe0zabJVLqlEiEPjy7yZ9PaXVeCW8WvalKyY63NKbX1uF3FlPk2Uyk8SvWcQX7fz+eeMiQ=="
|
||||
},
|
||||
"get-stdin": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
|
||||
@ -9837,6 +9837,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-native-get-random-values": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-get-random-values/-/react-native-get-random-values-1.5.0.tgz",
|
||||
"integrity": "sha512-LK+Wb8dEimJkd/dub7qziDmr9Tw4chhpzVeQ6JDo4czgfG4VXbptRyOMdu8503RiMF6y9pTH6ZUTkrrpprqT7w==",
|
||||
"requires": {
|
||||
"fast-base64-decode": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"react-refresh": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.4.3.tgz",
|
||||
|
@ -10,9 +10,9 @@
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"dependencies": {
|
||||
"get-random-values-polypony": "^1.0.0",
|
||||
"react": "16.13.1",
|
||||
"react-native": "0.63.2"
|
||||
"react-native": "0.63.2",
|
||||
"react-native-get-random-values": "1.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.8.4",
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
cp ../../packages/ethers/dist/ethers-all.umd.min.js libs/ethers.js
|
||||
cp ../../packages/ethers/dist/ethers.umd.min.js libs/ethers.js
|
||||
cp ../../node_modules/mocha/mocha.js libs/mocha.js
|
||||
cp ../../packages/tests/dist/tests.umd.js libs/tests.js
|
||||
cp ../../packages/shims/dist/index.js libs/shims.js
|
||||
|
Loading…
Reference in New Issue
Block a user