Skip to content

Commit 152a8f6

Browse files
committed
Ignore frame id global in IE
1 parent c4bcd0c commit 152a8f6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ var expect = require('expect.js');
22
// Note: IE8 requires that catch be referenced as ['catch'] on a promise
33

44
describe('CrossStorageClient', function() {
5+
// Mocha detects the frame id as being leaked in IE
6+
var userAgent = window.navigator.userAgent;
7+
var ieDetected = (userAgent.indexOf('MSIE ') !== false ||
8+
!!navigator.userAgent.match(/Trident.*rv\:11\./));
9+
10+
if (global.mocha && ieDetected) {
11+
global.mocha.globals(['CrossStorageClient-*']);
12+
}
13+
514
var origin, url, storage;
615

716
this.timeout((window.location.hostname === 'localhost') ? 5000 : 60000);

0 commit comments

Comments
 (0)