1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Add test for Edge compatibility

This commit is contained in:
Dan Finlay 2016-08-29 17:34:12 -07:00
parent fd5dad136f
commit e4e7489dd9

View File

@ -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() {
})
})
})