aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-05-17 07:19:10 +0800
committerDan Finlay <dan@danfinlay.com>2017-05-17 07:19:10 +0800
commitcaeadc24072829deaabd0f6a33563bb84c10008a (patch)
treef0cae63a9d41d82c26001cb757ff194fb807140f
parenta15e753c800617879384634a7096497550588eaf (diff)
downloadtangerine-wallet-browser-caeadc24072829deaabd0f6a33563bb84c10008a.tar
tangerine-wallet-browser-caeadc24072829deaabd0f6a33563bb84c10008a.tar.gz
tangerine-wallet-browser-caeadc24072829deaabd0f6a33563bb84c10008a.tar.bz2
tangerine-wallet-browser-caeadc24072829deaabd0f6a33563bb84c10008a.tar.lz
tangerine-wallet-browser-caeadc24072829deaabd0f6a33563bb84c10008a.tar.xz
tangerine-wallet-browser-caeadc24072829deaabd0f6a33563bb84c10008a.tar.zst
tangerine-wallet-browser-caeadc24072829deaabd0f6a33563bb84c10008a.zip
Linted and removed unused deps
-rw-r--r--package.json1
-rw-r--r--test/unit/components/pending-tx-test.js23
2 files changed, 8 insertions, 16 deletions
diff --git a/package.json b/package.json
index eb5ed8a32..14ddd2886 100644
--- a/package.json
+++ b/package.json
@@ -136,7 +136,6 @@
"browserify": "^13.0.0",
"chai": "^3.5.0",
"clone": "^1.0.2",
- "create-react-factory": "^0.2.1",
"deep-freeze-strict": "^1.1.1",
"del": "^2.2.0",
"envify": "^4.0.0",
diff --git a/test/unit/components/pending-tx-test.js b/test/unit/components/pending-tx-test.js
index 166b471cb..36339474c 100644
--- a/test/unit/components/pending-tx-test.js
+++ b/test/unit/components/pending-tx-test.js
@@ -2,15 +2,10 @@ const assert = require('assert')
const additions = require('react-testutils-additions')
const h = require('react-hyperscript')
const PendingTx = require('../../../ui/app/components/pending-tx')
-const createReactFactory = require('create-react-factory').createReactFactory
-const React = require('react')
-const shallow = require('react-test-renderer/shallow')
-const Factory = createReactFactory(PendingTx)
const ReactTestUtils = require('react-addons-test-utils')
const ethUtil = require('ethereumjs-util')
describe('PendingTx', function () {
- let pendingTxComponent
const identities = {
'0xfdea65c8e26263f6d9a1b5de9555d2931a33b826': {
@@ -38,7 +33,7 @@ describe('PendingTx', function () {
it('should use updated values when edited.', function (done) {
- const renderer = ReactTestUtils.createRenderer();
+ const renderer = ReactTestUtils.createRenderer()
const newGasPrice = '0x77359400'
const props = {
@@ -56,16 +51,14 @@ describe('PendingTx', function () {
}
const pendingTxComponent = h(PendingTx, props)
- const component = additions.renderIntoDocument(pendingTxComponent);
+ const component = additions.renderIntoDocument(pendingTxComponent)
renderer.render(pendingTxComponent)
const result = renderer.getRenderOutput()
const form = result.props.children
- const children = form.props.children[form.props.children.length - 1]
assert.equal(result.type, 'div', 'should create a div')
- try{
-
- const input = additions.find(component, '.cell.row input[type="number"]')[1]
+ try {
+ const input = additions.find(component, '.cell.row input[type='number']')[1]
ReactTestUtils.Simulate.change(input, {
target: {
value: 2,
@@ -76,14 +69,14 @@ describe('PendingTx', function () {
let form = additions.find(component, 'form')[0]
form.checkValidity = () => true
form.getFormEl = () => { return { checkValidity() { return true } } }
- ReactTestUtils.Simulate.submit(form, { preventDefault() {}, target: { checkValidity() {return true} } })
+ ReactTestUtils.Simulate.submit(form, { preventDefault() {}, target: { checkValidity() {
+ return true
+ } } })
} catch (e) {
- console.log("WHAAAA")
+ console.log('WHAAAA')
console.error(e)
}
-
})
-
})