karma: Error getting failed test output in IE11 without iframe

Expected behavior

Output of a failed test in IE11 gets logged in the console.

Actual behavior

An error is raised:

TypeError: result.suite.join is not a function
    at specFailure (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/karma/lib/reporters/base.js:94:33)
    at onSpecComplete (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/karma/lib/reporters/base.js:80:12)
    at null.<anonymous> (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/karma/lib/events.js:13:22)
    at emitTwo (events.js:100:13)
    at emit (events.js:185:7)
    at onResult (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/karma/lib/browser.js:216:13)
    at Array.forEach (native)
    at onResult (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/karma/lib/browser.js:206:21)
    at Socket.<anonymous> (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/karma/lib/events.js:13:22)
    at emitOne (events.js:95:20)
    at Socket.emit (events.js:182:7)
    at Socket.onevent (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/socket.io/lib/socket.js:335:8)
    at Socket.onpacket (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/socket.io/lib/socket.js:295:12)
    at Client.ondecoded (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/socket.io/lib/client.js:193:14)
    at Decoder.Emitter.emit (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/component-emitter/index.js:134:20)
    at Decoder.add (/Users/kostia/Code/tmp/karma-ie-debug/node_modules/socket.io-parser/index.js:247:12)

Enviroment Details

  • “jasmine”: “2.4.1”,
  • “karma”: “0.13.22”
  • “karma-jasmine”: “0.3.6”
  • “karma-sauce-launcher”: “0.3.0”
  • conf.js
module.exports = function(config) {
  config.set({
    singleRun: true,
    frameworks: ['jasmine'],
    files: ['test_spec.js'],
    client: {
      useIframe: false
    },
    browsers: ['ie'],
    customLaunchers: {
      ie: {
        base: 'SauceLabs',
        os: 'Windows 7',
        browserName: 'internet explorer',
        version: '11'
      }
    },
    sauceLabs: {
      startConnect: false,
      tunnelIdentifier: process.env.SAUCELABS_TUNNEL_IDENTIFIER,
      testName: 'debug',
    },
  });
};

Steps to reproduce the behaviour

Simply run a failing spec:

// test_spec.js
describe('when running failing specs on IE11', function() {
  it('raises an error while capturing test output', function() {
    expect(true).toBe(false);
  });
});

The crucial part it the switch client.useIframe. The error is only raise if the iframe is disabled as in my config.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 25 (14 by maintainers)

Commits related to this issue

Most upvoted comments

It would be great if somebody else from the Karma team knew exactly what’s going on 😛 I’m just doing my best to try and guide to a solution.