Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pass client config to mocha.setup

See original GitHub issue
// karma.conf.js
module.exports = function(config) {
    client: {
      mocha: {
        ui: 'tdd'

Should do:

window.mocha.setup({ui: 'tdd'});

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

chamrccommented, Aug 2, 2014

So I changed the timeout setting in my karma configuration file already and it does work for karma start but not grunt karma. So I duplicated that setting in the Gruntfile like this:

karma: {
    test: {
        configFile: 'config/test.conf.js',
        client: {
            mocha: {
                timeout: testTimeout // set to 5000

and grunt karma started to get the same 5000 ms timeout as well. Seems like grunt-karma is not passing additional arguments (other than the ones specified by karma) in Gruntfile.js to karma.

Well, I think this issue tracking should go to grunt-karma, not grunt-mocha.

maksimrcommented, May 22, 2015

close as obsolete

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mocha - the fun, simple, flexible JavaScript test framework
simple, flexible, fun. Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun....
Read more >
Getting Started with Node.js and Mocha - Semaphore Tutorial
Mocha is a simple, extensible and fast testing library for Node.js. This article will walk you through its installation, configuration and usage.
Read more >
Mocharc: The Essential Mocha Configuration Guide -
This blog post provides a comprehensive guide on Mocharc – that will help you configure Mocha, along with some helpful code examples.
Read more >
Is there a .mocha file where I can specify defaults such as
Yes. You can create a file ./test/mocha.opts and in the file you can specify --no-colors . See mocha.opts on Mocha Doc for more ......
Read more >
Mocha - API Manual
npm install -g mocha $ mkdir test $ $EDITOR test/test.js ... Passing arrow functions to Mocha is discouraged. ... Browser Configuration. Mocha options...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found