karma-runner / karma-ie-launcher

A Karma plugin. Launcher for Internet Explorer.
MIT License
59 stars 23 forks source link

Async tests on IE8/9 disconnects browser due to shared activity timeout #33

Open nehz opened 9 years ago

nehz commented 9 years ago

There seems to be a weird issue where IE8/9 executes async tests as one single test.

For example, the karma ui will go from 0/10 tests executed to 10/10 executed where as in IE10/11 it will execute them one by one. This is an issue if some individual tests takes long as each test is added together towards the browserNoActivityTimeout limit, which will cause karma to disconnect.

Some code to illustrate this:

describe('test', function() {
  function test(done) {
    setTimeout(function() { done(); }, 1000);
  }

  for(var i = 0; i < 11; i++) {
    it('should pass', test);
  }
});

using

customLaunchers: {
  IE8: {
    base: 'IE',
    'x-ua-compatible': 'IE=EmulateIE8'
  },
  IE9: {
    base: 'IE',
    'x-ua-compatible': 'IE=EmulateIE9'
  },
  IE10: {
    base: 'IE',
    'x-ua-compatible': 'IE=EmulateIE10'
  }
}