Overriding karma-mocha default timeout ( 2000ms )
Hello all,
There are rare exceptions where you want to raise the default timeout of your karma-mocha unit testing suite. Only for exceptional cases! If something it’s taking too long, usually it’s our fault, therefore that timeout is considered good practice.
// karma.conf.js
module.exports = function(config) {
config.set({
client: {
mocha: {
timeout : 6000 // 6 seconds - upped from 2 seconds
}
}
});
};
No comments yet.