aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/nameForAccount_test.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-05-05 09:01:46 +0800
committerGitHub <noreply@github.com>2017-05-05 09:01:46 +0800
commitf01891fc019b748151365cf7b04cbc26c94f3d06 (patch)
treec54cdcacb46b91ba5bd22451ec72f8a092495b22 /test/unit/nameForAccount_test.js
parenta72f50509010a12bf4fb879f2c638a38d2a210d2 (diff)
parent1e4855fc0e2e89ebe6b50ff8d34762f742433110 (diff)
downloadtangerine-wallet-browser-f01891fc019b748151365cf7b04cbc26c94f3d06.tar
tangerine-wallet-browser-f01891fc019b748151365cf7b04cbc26c94f3d06.tar.gz
tangerine-wallet-browser-f01891fc019b748151365cf7b04cbc26c94f3d06.tar.bz2
tangerine-wallet-browser-f01891fc019b748151365cf7b04cbc26c94f3d06.tar.lz
tangerine-wallet-browser-f01891fc019b748151365cf7b04cbc26c94f3d06.tar.xz
tangerine-wallet-browser-f01891fc019b748151365cf7b04cbc26c94f3d06.tar.zst
tangerine-wallet-browser-f01891fc019b748151365cf7b04cbc26c94f3d06.zip
Merge pull request #1376 from MetaMask/1061-Linting-Tests
1061 linting tests
Diffstat (limited to 'test/unit/nameForAccount_test.js')
-rw-r--r--test/unit/nameForAccount_test.js17
1 files changed, 7 insertions, 10 deletions
diff --git a/test/unit/nameForAccount_test.js b/test/unit/nameForAccount_test.js
index 6839d40f8..e7c0b18b4 100644
--- a/test/unit/nameForAccount_test.js
+++ b/test/unit/nameForAccount_test.js
@@ -4,25 +4,23 @@ var sinon = require('sinon')
var path = require('path')
var contractNamer = require(path.join(__dirname, '..', '..', 'ui', 'lib', 'contract-namer.js'))
-describe('contractNamer', function() {
-
- beforeEach(function() {
+describe('contractNamer', function () {
+ beforeEach(function () {
this.sinon = sinon.sandbox.create()
})
- afterEach(function() {
+ afterEach(function () {
this.sinon.restore()
})
- describe('naming a contract', function() {
-
- it('should return nothing for an unknown random account', function() {
+ describe('naming a contract', function () {
+ it('should return nothing for an unknown random account', function () {
const input = '0x2386F26FC10000'
const output = contractNamer(input)
assert.deepEqual(output, null)
})
- it('should accept identities as an optional second parameter', function() {
+ it('should accept identities as an optional second parameter', function () {
const input = '0x2386F26FC10000'.toLowerCase()
const expected = 'bar'
const identities = {}
@@ -31,7 +29,7 @@ describe('contractNamer', function() {
assert.deepEqual(output, expected)
})
- it('should check for identities case insensitively', function() {
+ it('should check for identities case insensitively', function () {
const input = '0x2386F26FC10000'.toLowerCase()
const expected = 'bar'
const identities = {}
@@ -39,6 +37,5 @@ describe('contractNamer', function() {
const output = contractNamer(input.toUpperCase(), identities)
assert.deepEqual(output, expected)
})
-
})
})