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