aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-06-24 07:09:25 +0800
committerkumavis <aaron@kumavis.me>2016-06-24 07:09:25 +0800
commit7eb89613ccee118d97a48d83336bbea44614da18 (patch)
treea3a72177a18b6c1284896950d82473b1ba718f58 /test
parentcc7dbace38bc41bb177738586e9a60adf541d2ab (diff)
downloadtangerine-wallet-browser-7eb89613ccee118d97a48d83336bbea44614da18.tar
tangerine-wallet-browser-7eb89613ccee118d97a48d83336bbea44614da18.tar.gz
tangerine-wallet-browser-7eb89613ccee118d97a48d83336bbea44614da18.tar.bz2
tangerine-wallet-browser-7eb89613ccee118d97a48d83336bbea44614da18.tar.lz
tangerine-wallet-browser-7eb89613ccee118d97a48d83336bbea44614da18.tar.xz
tangerine-wallet-browser-7eb89613ccee118d97a48d83336bbea44614da18.tar.zst
tangerine-wallet-browser-7eb89613ccee118d97a48d83336bbea44614da18.zip
icon-factory - overhaul to provide svg or imagified el
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/icon-factory-test.js31
1 files changed, 0 insertions, 31 deletions
diff --git a/test/unit/lib/icon-factory-test.js b/test/unit/lib/icon-factory-test.js
deleted file mode 100644
index 2f24d408c..000000000
--- a/test/unit/lib/icon-factory-test.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const assert = require('assert')
-const sinon = require('sinon')
-
-const path = require('path')
-const IconFactoryGen = require(path.join(__dirname, '..', '..', '..', 'ui', 'lib', 'icon-factory.js'))
-
-describe('icon-factory', function() {
- let iconFactory, address, diameter
-
- beforeEach(function() {
- iconFactory = IconFactoryGen((d,n) => 'stubicon')
- address = '0x012345671234567890'
- diameter = 50
- })
-
- it('should return a data-uri string for any address and diameter', function() {
- const output = iconFactory.iconForAddress(address, diameter)
- assert.ok(output.indexOf('data:image/svg') === 0)
- assert.equal(output, iconFactory.cache[address][diameter])
- })
-
- it('should default to cache first', function() {
- const testOutput = 'foo'
- const mockSizeCache = {}
- mockSizeCache[diameter] = testOutput
- iconFactory.cache[address] = mockSizeCache
-
- const output = iconFactory.iconForAddress(address, diameter)
- assert.equal(output, testOutput)
- })
-})