1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
This commit is contained in:
Dan Finlay 2017-05-16 16:49:59 -07:00
parent cfb7bfed18
commit c1bef31d9d

View File

@ -54,7 +54,6 @@ describe('PendingTx', function () {
const component = additions.renderIntoDocument(pendingTxComponent) const component = additions.renderIntoDocument(pendingTxComponent)
renderer.render(pendingTxComponent) renderer.render(pendingTxComponent)
const result = renderer.getRenderOutput() const result = renderer.getRenderOutput()
const form = result.props.children
assert.equal(result.type, 'div', 'should create a div') assert.equal(result.type, 'div', 'should create a div')
try { try {
@ -63,10 +62,10 @@ describe('PendingTx', function () {
target: { target: {
value: 2, value: 2,
checkValidity() { return true }, checkValidity() { return true },
} },
}) })
let form = additions.find(component, 'form')[0] const form = additions.find(component, 'form')[0]
form.checkValidity = () => true form.checkValidity = () => true
form.getFormEl = () => { return { checkValidity() { return true } } } form.getFormEl = () => { return { checkValidity() { return true } } }
ReactTestUtils.Simulate.submit(form, { preventDefault() {}, target: { checkValidity() { ReactTestUtils.Simulate.submit(form, { preventDefault() {}, target: { checkValidity() {