diff options
author | kumavis <kumavis@users.noreply.github.com> | 2017-06-13 04:27:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-13 04:27:04 +0800 |
commit | 27220b7bcd5ea1ebdae3bc1b494d28d9c828918c (patch) | |
tree | c9385fba3d742ca9cbfb9f3b4c6c9ef29c4f4a1b /test/unit/extension-test.js | |
parent | 57d1a1f1860e50837104a10b7b9f86d398c795ec (diff) | |
parent | 8af41f1b0539e70cf4c6e1f4a9f4b10ad13656fc (diff) | |
download | tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.gz tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.bz2 tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.lz tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.xz tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.zst tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.zip |
Merge branch 'master' into i#1203MainNetSwitch
Diffstat (limited to 'test/unit/extension-test.js')
-rw-r--r-- | test/unit/extension-test.js | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/test/unit/extension-test.js b/test/unit/extension-test.js deleted file mode 100644 index 8f259f05c..000000000 --- a/test/unit/extension-test.js +++ /dev/null @@ -1,77 +0,0 @@ -var assert = require('assert') -var sinon = require('sinon') -const ethUtil = require('ethereumjs-util') -global.chrome = {} -global.browser = {} - -var path = require('path') -var Extension = require(path.join(__dirname, '..', '..', 'app', 'scripts', 'lib', 'extension-instance.js')) - -describe('extension', function() { - - describe('extension.getURL', function() { - const desiredResult = 'http://the-desired-result.io' - - describe('in Chrome or Firefox', function() { - global.chrome.extension = { - getURL: () => desiredResult - } - - it('returns the desired result', function() { - const extension = new Extension() - const result = extension.extension.getURL() - assert.equal(result, desiredResult) - }) - }) - - describe('in Microsoft Edge', function() { - global.browser.extension = { - getURL: () => desiredResult - } - - it('returns the desired result', function() { - const extension = new Extension() - const result = extension.extension.getURL() - assert.equal(result, desiredResult) - }) - }) - }) - - describe('with chrome global', function() { - let extension - - beforeEach(function() { - global.chrome = { - alarms: 'foo' - } - extension = new Extension() - }) - - it('should use the chrome global apis', function() { - assert.equal(extension.alarms, 'foo') - }) - }) - - describe('without chrome global', function() { - let extension - let realWindow - - beforeEach(function() { - realWindow = window - window = global - global.chrome = undefined - global.alarms = 'foo' - extension = new Extension() - }) - - after(function() { - window = realWindow - }) - - it('should use the global apis', function() { - assert.equal(extension.alarms, 'foo') - }) - }) - - -}) |