mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Linted and removed unused deps
This commit is contained in:
parent
a15e753c80
commit
caeadc2407
@ -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",
|
||||
|
@ -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]
|
||||
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)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user