aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/nameForAccount_test.js
diff options
context:
space:
mode:
authorThomas Huang <thomas.b.huang@gmail.com>2017-05-05 05:35:10 +0800
committerThomas Huang <thomas.b.huang@gmail.com>2017-05-05 05:35:10 +0800
commit0b13429daf00ddd5bdf2705c7a95d7a9d5792f54 (patch)
treef249d8deb5fa48db54d70757de944b2c8ff76a2e /test/unit/nameForAccount_test.js
parent8f5334e4aca8b95963f57b0fbf862256b692dbd9 (diff)
downloadtangerine-wallet-browser-0b13429daf00ddd5bdf2705c7a95d7a9d5792f54.tar
tangerine-wallet-browser-0b13429daf00ddd5bdf2705c7a95d7a9d5792f54.tar.gz
tangerine-wallet-browser-0b13429daf00ddd5bdf2705c7a95d7a9d5792f54.tar.bz2
tangerine-wallet-browser-0b13429daf00ddd5bdf2705c7a95d7a9d5792f54.tar.lz
tangerine-wallet-browser-0b13429daf00ddd5bdf2705c7a95d7a9d5792f54.tar.xz
tangerine-wallet-browser-0b13429daf00ddd5bdf2705c7a95d7a9d5792f54.tar.zst
tangerine-wallet-browser-0b13429daf00ddd5bdf2705c7a95d7a9d5792f54.zip
Lint 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)
})
-
})
})