diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-06-13 08:06:39 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-06-13 08:17:16 +0800 |
commit | a741cc4fc4fb68e3f460c70ea848bdf3d2d2c894 (patch) | |
tree | 58652d4789e71a47a763096e746bd25904d91bfe /test/unit/nameForAccount_test.js | |
parent | d05d9a5f57b9311d6f29539233f9065330e8bda4 (diff) | |
parent | bbe0c73dca45542b519036bec2bae5feb1e55485 (diff) | |
download | tangerine-wallet-browser-a741cc4fc4fb68e3f460c70ea848bdf3d2d2c894.tar.gz tangerine-wallet-browser-a741cc4fc4fb68e3f460c70ea848bdf3d2d2c894.tar.zst tangerine-wallet-browser-a741cc4fc4fb68e3f460c70ea848bdf3d2d2c894.zip |
Merge branch 'master' into AddTokenList
Diffstat (limited to 'test/unit/nameForAccount_test.js')
-rw-r--r-- | test/unit/nameForAccount_test.js | 17 |
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) }) - }) }) |