Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with mocha test watching #9

Open
domharrington opened this issue Oct 20, 2014 · 2 comments
Open

Doesn't work with mocha test watching #9

domharrington opened this issue Oct 20, 2014 · 2 comments
Labels

Comments

@domharrington
Copy link

Create a test file:

var assert = require('assert');
var testData = require('mocha-testdata');

describe('My test suite', function() {
  testData([1, 2, 3], [3, 2, 1]).test('sum to 6', function(a, b, c) {
    assert.strictEqual(a + b + c, 6);
  });
});

Run this with mocha's -w option.

mocha test.js -w

․․

2 passing (3ms)

Touch the test file whilst watching: touch test.js.
Expected result: run both of the tests again, as above.
Actual result:

0 passing (0ms)

The tests don't get picked up again on the second pass. Do you know why this is? I haven't looked at the code for it in mocha or in this module. Have you come across this before?

Thanks

@jgoz
Copy link
Contributor

jgoz commented Oct 20, 2014

Honestly, I didn't know mocha had a watch mode. Will investigate.

@jgoz jgoz added the bug label Oct 20, 2014
@billbogaiv
Copy link

@domharrington @jgoz I too have encountered this problem and use a similar pattern to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants