Skip to content

Commit

Permalink
Add regression test for #2027
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Scholtes committed Jul 1, 2019
1 parent b214862 commit d8b28da
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/integration/options/watch.spec.js
Expand Up @@ -115,6 +115,20 @@ describe('--watch', function() {
expect(results[1].failures, 'to have length', 1);
});
});

// Regresseion test for https://github.com/mochajs/mocha/issues/2027
it('respects --fgrep on re-runs', function() {
const testFile = path.join(this.tempDir, 'test.js');
copyFixture('options/grep', testFile);

return runMochaWatch([testFile, '--fgrep', 'match'], this.tempDir, () => {
touchFile(testFile);
}).then(results => {
expect(results, 'to have length', 2);
expect(results[0].tests, 'to have length', 2);
expect(results[1].tests, 'to have length', 2);
});
});
});
});

Expand Down

0 comments on commit d8b28da

Please sign in to comment.