Categories
JavaScript Answers

How to fix Karma/Jasmine times out without running tests with Node?

Spread the love

To fix Karma/Jasmine times out without running tests with Node, we increase the timeout for running tests.

For instance, in karma.conf.js, we write

module.exports = function (config) {
  config.set({
    //...
    captureTimeout: 60000,
    browserDisconnectTimeout: 10000,
    browserDisconnectTolerance: 1,
    browserNoActivityTimeout: 60000,
  });
};

to set browserNoActivityTimeout to 60000ms to increase the test timeout.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *