Mocha: When using --delay, .only() no longer works

Created on 19 Aug 2015  路  9Comments  路  Source: mochajs/mocha

When I run a test with --delay, and I specify only(), the entire test suite gets run, not just the only block.

confirmed-bug help wanted

All 9 comments

@wlingke can you please provide some example code

run below with --delay will fail yield in test two being run.

var assert = require('assert')
setTimeout(function(){

    describe.only('Should only run this', function(){
        it('passing test', function(){
            assert(true)
        })
    });

    describe('Should not run this', function(){
        it('failing test', function(){
            assert(false)
        })
    });

    run()
}, 1000);

Can confirm.

I am a bot that watches issues for inactivity.
This issue hasn't had any recent activity, and I'm labeling it stale. In 14 days, if there are no further comments or activity, I will close this issue.
Thanks for contributing to Mocha!

Can confirm to keep this from closing.

Yup, tried it out and this is still an issue.

Surprising, because only got redesigned and rewritten in version 3.

Hi, @ScottFreeCode. I have created the following PR for the fix. Thanks for the instructions.
https://github.com/mochajs/mocha/pull/3215

This issue can be closed, see PR #3215

Was this page helpful?
0 / 5 - 0 ratings

Related issues

niftylettuce picture niftylettuce  路  3Comments

adamhooper picture adamhooper  路  3Comments

enigmatic00 picture enigmatic00  路  3Comments

eschwartz picture eschwartz  路  3Comments

jamietre picture jamietre  路  3Comments