mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
Update App.test.js
This commit is contained in:
parent
a1ce1796a6
commit
37b5cf0767
@ -8,20 +8,6 @@ global.crypto = require('crypto'); // shall be used by tests under nodejs CLI, b
|
||||
let assert = require('assert');
|
||||
jest.mock('react-native-qrcode-svg', () => 'Video');
|
||||
jest.useFakeTimers();
|
||||
jest.mock('Picker', () => {
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
const React = require('React');
|
||||
const PropTypes = require('prop-types');
|
||||
return class MockPicker extends React.Component {
|
||||
static Item = props => React.createElement('Item', props, props.children);
|
||||
static propTypes = { children: PropTypes.any };
|
||||
static defaultProps = { children: '' };
|
||||
|
||||
render() {
|
||||
return React.createElement('Picker', this.props, this.props.children);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock('amplitude-js', () => ({
|
||||
getInstance: function() {
|
||||
@ -32,20 +18,6 @@ jest.mock('amplitude-js', () => ({
|
||||
},
|
||||
}));
|
||||
|
||||
jest.mock('ScrollView', () => {
|
||||
const RealComponent = require.requireActual('ScrollView');
|
||||
const React = require('React');
|
||||
class ScrollView extends React.Component {
|
||||
scrollTo() {}
|
||||
|
||||
render() {
|
||||
return React.createElement('ScrollView', this.props, this.props.children);
|
||||
}
|
||||
}
|
||||
ScrollView.propTypes = RealComponent.propTypes;
|
||||
return ScrollView;
|
||||
});
|
||||
|
||||
it('BlueHeader works', () => {
|
||||
const rendered = TestRenderer.create(<BlueHeader />).toJSON();
|
||||
expect(rendered).toBeTruthy();
|
||||
|
Loading…
Reference in New Issue
Block a user