Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .mocharc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
require: test/setup
ui: bdd
require: 'test/setup'
ui: 'bdd'
global:
- okGlobalA,okGlobalB
- okGlobalC
- callback*
timeout: 300
- 'okGlobalA,okGlobalB'
- 'okGlobalC'
- 'callback*'
timeout: 1000
watch-ignore:
- '.*'
- 'docs/_dist/**'
- 'docs/_site/**'
- 'node_modules'
- 'coverage'
- 'cache'
22 changes: 11 additions & 11 deletions example/config/.mocharc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ delay: false
diff: true
exit: false # could be expressed as "no-exit: true"
extension:
- js
- 'js'
# fgrep and grep are mutually exclusive
# fgrep: something
file:
- /path/to/some/file
- /path/to/some/other/file
- '/path/to/some/file'
- '/path/to/some/other/file'
forbid-only: false
forbid-pending: false
full-trace: false
global:
- jQuery
- $
- 'jQuery'
- '$'
# fgrep and grep are mutually exclusive
# grep: something
growl: false
ignore:
- /path/to/some/ignored/file
- '/path/to/some/ignored/file'
inline-diffs: false
# needs to be used with grep or fgrep
# invert: false
recursive: false
reporter: spec
reporter: 'spec'
reporter-option:
- foo=bar
- baz=quux
- 'foo=bar'
- 'baz=quux'
require: '@babel/register'
retries: 1
slow: 75
sort: false
spec: test/**/*.spec.js # the positional arguments!
spec: 'test/**/*.spec.js' # the positional arguments!
timeout: false # same as "no-timeout: true" or "timeout: 0"
trace-warnings: true # node flags ok
ui: bdd
ui: 'bdd'
v8-stack-trace-limit: 100 # V8 flags are prepended with "v8-"
watch: false
watch-files:
Expand Down
4 changes: 3 additions & 1 deletion lib/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ Mocha.unloadFile = function(file) {
* @chainable
*/
Mocha.prototype.unloadFiles = function() {
this.files.forEach(Mocha.unloadFile);
this.files.forEach(function(file) {
Mocha.unloadFile(file);
});
return this;
};

Expand Down
2 changes: 1 addition & 1 deletion test/integration/diffs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('diffs', function() {
var diffs, expected;

before(function(done) {
run('diffs/diffs.fixture.js', ['-C'], function(err, res) {
run('diffs/diffs.fixture.js', [], function(err, res) {
if (err) {
done(err);
return;
Expand Down
3 changes: 2 additions & 1 deletion test/integration/fixtures/uncaught/listeners.fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
const assert = require('assert');
const mocha = require("../../../../lib/mocha");

for (let i = 0; i < 15; i++) {
// keep this low to avoid warning
for (let i = 0; i < 5; i++) {
const r = new mocha.Runner(new mocha.Suite("" + i, undefined));
r.run();
}
Expand Down
Loading