Skip to content

Commit

Permalink
Merge pull request #1545 from LiskHQ/1443-remove-unit-tests-of-HOC
Browse files Browse the repository at this point in the history
Remove unit tests of HOCs - Closes #1443
  • Loading branch information
massao committed Dec 11, 2018
2 parents 2c5fe06 + ff7fc23 commit 03866a2
Show file tree
Hide file tree
Showing 54 changed files with 166 additions and 1,051 deletions.
2 changes: 0 additions & 2 deletions i18n/locales/en/common.json
Expand Up @@ -83,7 +83,6 @@
"Create your second passphrase": "Create your second passphrase",
"Currency": "Currency",
"Current version is up-to-date.": "Current version is up-to-date.",
"Currently we speaking english and german.": "Currently we speaking english and german.",
"Custom Node": "Custom Node",
"Cut": "Cut",
"Dashboard": "Dashboard",
Expand Down Expand Up @@ -164,7 +163,6 @@
"Keep track of any Lisk ID balance. Only you will see who you follow.": "Keep track of any Lisk ID balance. Only you will see who you follow.",
"LSK received": "LSK received",
"LSK/BTC": "LSK/BTC",
"Language": "Language",
"Later": "Later",
"Latest activity": "Latest activity",
"Learn about blockchain with our comprehensive knowledge base.": "Learn about blockchain with our comprehensive knowledge base.",
Expand Down
1 change: 1 addition & 0 deletions src/components/account/index.js
@@ -1,3 +1,4 @@
/* istanbul skip file */
import { connect } from 'react-redux';
import { translate } from 'react-i18next';
import Account from './account';
Expand Down
52 changes: 0 additions & 52 deletions src/components/account/index.test.js

This file was deleted.

29 changes: 29 additions & 0 deletions src/components/accountTransactions/accountTransactions.js
@@ -0,0 +1,29 @@
import React from 'react';
import grid from 'flexboxgrid/dist/flexboxgrid.css';
import ExplorerTransactions from './../transactions/explorerTransactions';
import SendTo from '../sendTo';
import styles from './accountTransactions.css';

class AccountTransactions extends React.Component {
// eslint-disable-next-line class-methods-use-this
render() {
return <div className={`${grid.row} ${styles.wrapper}`}>
<div className={`${grid['col-md-4']} ${styles.sendTo}`}>
<SendTo
address={this.props.match.params.address}
t={this.props.t}
account={this.props.account}
delegate={this.props.delegate}
/>
</div>
<div className={`${grid['col-sm-12']} ${styles.transactions} ${grid['col-md-8']} ${styles.transactions}`}>
<ExplorerTransactions
history={this.props.history}
address={this.props.match.params.address}
delegate={this.props.delegate} />
</div>
</div>;
}
}

export default AccountTransactions;
Expand Up @@ -64,9 +64,5 @@ describe('AccountTransaction Component', () => {
it('renders AccountTransaction Component and loads account transactions', () => {
const renderedAccountTransactions = wrapper.find(AccountTransactions);
expect(renderedAccountTransactions).to.be.present();
/* eslint-disable no-unused-expressions */
expect(searchTransactionsSpy).to.have.been.calledOnce;
expect(searchAccountSpy).to.have.been.calledOnce;
/* eslint-enable no-unused-expressions */
});
});
29 changes: 2 additions & 27 deletions src/components/accountTransactions/index.js
@@ -1,32 +1,7 @@
import React from 'react';
/* istanbul ignore file */
import { connect } from 'react-redux';
import { translate } from 'react-i18next';
import grid from 'flexboxgrid/dist/flexboxgrid.css';
import ExplorerTransactions from './../transactions/explorerTransactions';
import SendTo from '../sendTo';
import styles from './accountTransactions.css';

class AccountTransactions extends React.Component {
// eslint-disable-next-line class-methods-use-this
render() {
return <div className={`${grid.row} ${styles.wrapper}`}>
<div className={`${grid['col-md-4']} ${styles.sendTo}`}>
<SendTo
address={this.props.match.params.address}
t={this.props.t}
account={this.props.account}
delegate={this.props.delegate}
/>
</div>
<div className={`${grid['col-sm-12']} ${styles.transactions} ${grid['col-md-8']} ${styles.transactions}`}>
<ExplorerTransactions
history={this.props.history}
address={this.props.match.params.address}
delegate={this.props.delegate} />
</div>
</div>;
}
}
import AccountTransactions from './accountTransactions';

const mapStateToProps = state => ({
publicKey: state.account.publicKey,
Expand Down
1 change: 1 addition & 0 deletions src/components/authInputs/index.js
@@ -1,3 +1,4 @@
/* istanbul skip file */
import { connect } from 'react-redux';
import { translate } from 'react-i18next';

Expand Down
33 changes: 0 additions & 33 deletions src/components/authInputs/index.test.js

This file was deleted.

7 changes: 4 additions & 3 deletions src/components/authenticate/index.js
@@ -1,3 +1,4 @@
/* istanbul ignore file */
import { connect } from 'react-redux';
import { translate } from 'react-i18next';
import { accountUpdated } from '../../actions/account';
Expand All @@ -11,9 +12,9 @@ const mapStateToProps = state => ({
account: state.account,
});

const mapDispatchToProps = dispatch => ({
accountUpdated: data => dispatch(accountUpdated(data)),
});
const mapDispatchToProps = {
accountUpdated,
};

export default connect(
mapStateToProps,
Expand Down
58 changes: 0 additions & 58 deletions src/components/authenticate/index.test.js

This file was deleted.

7 changes: 4 additions & 3 deletions src/components/confirmVotes/index.js
@@ -1,3 +1,4 @@
/* istanbul ignore file */
import { connect } from 'react-redux';
import { translate } from 'react-i18next';

Expand All @@ -10,8 +11,8 @@ const mapStateToProps = state => ({
account: state.account,
});

const mapDispatchToProps = dispatch => ({
votePlaced: data => dispatch(votePlaced(data)),
});
const mapDispatchToProps = {
votePlaced,
};

export default connect(mapStateToProps, mapDispatchToProps)(translate()(ConfirmVotes));
92 changes: 0 additions & 92 deletions src/components/confirmVotes/index.test.js

This file was deleted.

9 changes: 5 additions & 4 deletions src/components/converter/index.js
@@ -1,3 +1,4 @@
/* istanbul ignore file */
import { connect } from 'react-redux';

import { settingsUpdated } from '../../actions/settings';
Expand All @@ -16,10 +17,10 @@ const mapStateToProps = state => ({
},
});

const mapDispatchToProps = dispatch => ({
settingsUpdated: data => dispatch(settingsUpdated(data)),
getPriceTicker: () => dispatch(getPriceTicker()),
});
const mapDispatchToProps = {
settingsUpdated,
getPriceTicker,
};

export default connect(
mapStateToProps,
Expand Down

0 comments on commit 03866a2

Please sign in to comment.