aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-30 08:34:12 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-30 08:34:12 +0800
commite4e7489dd9085c4fa2cef9262bc683d605d26b50 (patch)
treeff474820f2e52537cc87d6548574007d19824ef7
parentfd5dad136fafb8c40d74ede5ff68fe909b08166a (diff)
downloadtangerine-wallet-browser-e4e7489dd9085c4fa2cef9262bc683d605d26b50.tar
tangerine-wallet-browser-e4e7489dd9085c4fa2cef9262bc683d605d26b50.tar.gz
tangerine-wallet-browser-e4e7489dd9085c4fa2cef9262bc683d605d26b50.tar.bz2
tangerine-wallet-browser-e4e7489dd9085c4fa2cef9262bc683d605d26b50.tar.lz
tangerine-wallet-browser-e4e7489dd9085c4fa2cef9262bc683d605d26b50.tar.xz
tangerine-wallet-browser-e4e7489dd9085c4fa2cef9262bc683d605d26b50.tar.zst
tangerine-wallet-browser-e4e7489dd9085c4fa2cef9262bc683d605d26b50.zip
Add test for Edge compatibility
-rw-r--r--test/unit/extension-test.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/unit/extension-test.js b/test/unit/extension-test.js
index 6b695e835..86e1d887a 100644
--- a/test/unit/extension-test.js
+++ b/test/unit/extension-test.js
@@ -9,6 +9,34 @@ var Extension = require(path.join(__dirname, '..', '..', 'app', 'scripts', 'lib'
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
@@ -45,4 +73,5 @@ describe('extension', function() {
})
})
+
})