mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
Merge pull request #2618 from MetaMask/NewUI-flat-update-deps
New ui flat update deps
This commit is contained in:
commit
9a3ca5d502
15
package.json
15
package.json
@ -94,7 +94,7 @@
|
||||
"ethjs": "^0.2.8",
|
||||
"ethjs-contract": "^0.1.9",
|
||||
"ethjs-ens": "^2.0.0",
|
||||
"ethjs-query": "^0.2.9",
|
||||
"ethjs-query": "^0.3.1",
|
||||
"express": "^4.15.5",
|
||||
"extension-link-enabler": "^1.0.0",
|
||||
"extensionizer": "^1.0.0",
|
||||
@ -138,9 +138,9 @@
|
||||
"pumpify": "^1.3.4",
|
||||
"qrcode-npm": "0.0.3",
|
||||
"ramda": "^0.24.1",
|
||||
"react": "^15.0.2",
|
||||
"react": "^15.6.2",
|
||||
"react-addons-css-transition-group": "^15.6.0",
|
||||
"react-dom": "^15.5.4",
|
||||
"react-dom": "^15.6.2",
|
||||
"react-hyperscript": "^3.0.0",
|
||||
"react-markdown": "^2.3.0",
|
||||
"react-redux": "^5.0.5",
|
||||
@ -178,7 +178,7 @@
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"babel-register": "^6.7.2",
|
||||
"babelify": "^7.2.0",
|
||||
"babelify": "^8.0.0",
|
||||
"beefy": "^2.1.5",
|
||||
"brfs": "^1.4.3",
|
||||
"browserify": "^14.4.0",
|
||||
@ -187,7 +187,8 @@
|
||||
"deep-freeze-strict": "^1.1.1",
|
||||
"del": "^3.0.0",
|
||||
"envify": "^4.0.0",
|
||||
"enzyme": "^2.8.2",
|
||||
"enzyme": "^3.2.0",
|
||||
"enzyme-adapter-react-15": "^1.0.5",
|
||||
"eslint-plugin-chai": "0.0.1",
|
||||
"eslint-plugin-mocha": "^4.9.0",
|
||||
"eslint-plugin-react": "^7.4.0",
|
||||
@ -223,9 +224,9 @@
|
||||
"open": "0.0.5",
|
||||
"prompt": "^1.0.0",
|
||||
"qs": "^6.2.0",
|
||||
"qunit": "^1.0.0",
|
||||
"qunitjs": "^2.4.1",
|
||||
"react-addons-test-utils": "^15.5.1",
|
||||
"react-test-renderer": "^15.5.4",
|
||||
"react-test-renderer": "^15.6.2",
|
||||
"react-testutils-additions": "^15.2.0",
|
||||
"redux-test-utils": "^0.1.3",
|
||||
"sinon": "^4.0.0",
|
||||
|
@ -1,3 +1,7 @@
|
||||
import Enzyme from 'enzyme'
|
||||
import Adapter from 'enzyme-adapter-react-15'
|
||||
|
||||
Enzyme.configure({ adapter: new Adapter() })
|
||||
// disallow promises from swallowing errors
|
||||
enableFailureOnUnhandledPromiseRejection()
|
||||
|
||||
|
@ -1,11 +1,16 @@
|
||||
const shallow = require('enzyme').shallow
|
||||
const { shallow, mount } = require('enzyme')
|
||||
|
||||
module.exports = shallowWithStore
|
||||
|
||||
function shallowWithStore (component, store) {
|
||||
exports.shallowWithStore = function shallowWithStore (component, store) {
|
||||
const context = {
|
||||
store,
|
||||
}
|
||||
|
||||
return shallow(component, { context })
|
||||
};
|
||||
}
|
||||
|
||||
exports.mountWithStore = function mountWithStore (component, store) {
|
||||
const context = {
|
||||
store,
|
||||
}
|
||||
return mount(component, { context })
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
const assert = require('assert')
|
||||
const h = require('react-hyperscript')
|
||||
const { createMockStore } = require('redux-test-utils')
|
||||
const shallowWithStore = require('../../lib/shallow-with-store')
|
||||
const { shallowWithStore } = require('../../lib/shallow-with-store')
|
||||
const BalanceComponent = require('../../../ui/app/components/balance-component')
|
||||
const mockState = {
|
||||
metamask: {
|
||||
|
@ -4,7 +4,7 @@ const PendingTx = require('../../../ui/app/components/pending-tx')
|
||||
const ethUtil = require('ethereumjs-util')
|
||||
|
||||
const { createMockStore } = require('redux-test-utils')
|
||||
const shallowWithStore = require('../../lib/shallow-with-store')
|
||||
const { shallowWithStore } = require('../../lib/shallow-with-store')
|
||||
|
||||
const identities = { abc: {}, def: {} }
|
||||
const mockState = {
|
||||
|
@ -6,7 +6,7 @@ const path = require('path');
|
||||
const Dropdown = require(path.join(__dirname, '..', '..', '..', '..', 'ui', 'app', 'components', 'dropdowns', 'index.js')).Dropdown;
|
||||
|
||||
const { createMockStore } = require('redux-test-utils')
|
||||
const shallowWithStore = require('../../../lib/shallow-with-store')
|
||||
const { mountWithStore } = require('../../../lib/shallow-with-store')
|
||||
|
||||
const mockState = {
|
||||
metamask: {
|
||||
@ -39,7 +39,7 @@ describe('Dropdown components', function () {
|
||||
onClick = sinon.spy();
|
||||
|
||||
store = createMockStore(mockState)
|
||||
component = shallowWithStore(h(
|
||||
component = mountWithStore(h(
|
||||
Dropdown,
|
||||
dropdownComponentProps,
|
||||
[
|
||||
@ -57,7 +57,7 @@ describe('Dropdown components', function () {
|
||||
}, 'Item 2'),
|
||||
]
|
||||
), store)
|
||||
dropdownComponent = component.dive()
|
||||
dropdownComponent = component
|
||||
})
|
||||
|
||||
it('can render two items', function () {
|
||||
|
Loading…
Reference in New Issue
Block a user