mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
Skip jazzicons in unit tests
This commit is contained in:
parent
19db11856b
commit
c4be4c7195
@ -57,6 +57,7 @@
|
||||
"debounce": "^1.0.0",
|
||||
"deep-extend": "^0.4.1",
|
||||
"denodeify": "^1.2.1",
|
||||
"detect-node": "^2.0.3",
|
||||
"disc": "^1.3.2",
|
||||
"dnode": "^1.2.2",
|
||||
"end-of-stream": "^1.1.0",
|
||||
@ -169,6 +170,7 @@
|
||||
"qunit": "^0.9.1",
|
||||
"react-addons-test-utils": "^15.5.1",
|
||||
"react-dom": "^15.5.4",
|
||||
"react-test-renderer": "^15.5.4",
|
||||
"react-testutils-additions": "^15.2.0",
|
||||
"sinon": "^1.17.3",
|
||||
"tape": "^4.5.1",
|
||||
|
@ -1,6 +1,7 @@
|
||||
const Component = require('react').Component
|
||||
const h = require('react-hyperscript')
|
||||
const inherits = require('util').inherits
|
||||
const isNode = require('detect-node')
|
||||
const findDOMNode = require('react-dom').findDOMNode
|
||||
const jazzicon = require('jazzicon')
|
||||
const iconFactoryGen = require('../../lib/icon-factory')
|
||||
@ -40,8 +41,10 @@ IdenticonComponent.prototype.componentDidMount = function () {
|
||||
|
||||
var container = findDOMNode(this)
|
||||
var diameter = props.diameter || this.defaultDiameter
|
||||
if (!isNode) {
|
||||
var img = iconFactory.iconForAddress(address, diameter, false)
|
||||
container.appendChild(img)
|
||||
}
|
||||
}
|
||||
|
||||
IdenticonComponent.prototype.componentDidUpdate = function () {
|
||||
@ -58,6 +61,8 @@ IdenticonComponent.prototype.componentDidUpdate = function () {
|
||||
}
|
||||
|
||||
var diameter = props.diameter || this.defaultDiameter
|
||||
if (!isNode) {
|
||||
var img = iconFactory.iconForAddress(address, diameter, false)
|
||||
container.appendChild(img)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user