From de5cf2526ca3b3791545afc32d90a3bb88a8b8e3 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 11 May 2017 17:15:45 -0700 Subject: Fix test up a bit --- test/unit/components/pending-tx-test.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/unit/components/pending-tx-test.js b/test/unit/components/pending-tx-test.js index caaf66b49..5ddea7b23 100644 --- a/test/unit/components/pending-tx-test.js +++ b/test/unit/components/pending-tx-test.js @@ -7,7 +7,6 @@ console.dir(createReactFactory) const shallow = require('enzyme').shallow const Factory = createReactFactory(PendingTx) const ReactTestUtils = require('react-addons-test-utils') -const renderer = ReactTestUtils.createRenderer(); describe.only('PendingTx', function () { let pendingTxComponent @@ -38,6 +37,7 @@ describe.only('PendingTx', function () { it('should use updated values when edited.', function (done) { + const renderer = ReactTestUtils.createRenderer(); const newGasPrice = '0x451456' const props = { @@ -53,7 +53,9 @@ describe.only('PendingTx', function () { const pendingTxComponent = h(PendingTx, props) renderer.render(pendingTxComponent) - console.dir(pendingTxComponent) + const result = renderer.getRenderOutput() + assert.equal(result.type, 'div', 'should create a div') + console.dir(result) const noop = () => {} @@ -67,10 +69,6 @@ describe.only('PendingTx', function () { // Click the submit button // Get the output of the submit event. - setTimeout(() => { - console.log('hitting submit') - pendingTxComponent.onSubmit({ preventDefault: noop }) - }, 20) }, 200) console.log('calling render') -- cgit