Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
Set options.run true by default
Browse files Browse the repository at this point in the history
  • Loading branch information
kmiyashiro committed Mar 27, 2016
1 parent 45c7906 commit 5095309
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 26 deletions.
18 changes: 0 additions & 18 deletions Gruntfile.js
Expand Up @@ -53,11 +53,6 @@ module.exports = function(grunt) {
},

reporter: 'Spec',

// Indicates whether 'mocha.run()' should be executed in
// 'bridge.js'
run: true,

timeout: 10000
}
},
Expand All @@ -75,10 +70,6 @@ module.exports = function(grunt) {

// URLs passed through as options
urls: ['http://localhost:' + port + '/example/test/test2.html'],

// Indicates whether 'mocha.run()' should be executed in
// 'bridge.js'
run: true
}
},

Expand All @@ -91,7 +82,6 @@ module.exports = function(grunt) {
grep: 'food'
},
reporter: './example/test/reporter/simple',
run: true
}
},

Expand All @@ -113,7 +103,6 @@ module.exports = function(grunt) {
dest: 'example/test/results/spec.out',
options: {
reporter: 'Spec',
run: true
}
},

Expand All @@ -124,8 +113,6 @@ module.exports = function(grunt) {

// URLs passed through as options
urls: ['http://localhost:' + (port + 1) + '/example/test/test2.html'],

run: true
},
dest: 'example/test/results/xunit.out'
},
Expand All @@ -135,18 +122,13 @@ module.exports = function(grunt) {
src: ['example/test/testBail.html'],
// Bail option
options: {
run: true,
bail: true
}
},

// This test should never run
neverTest: {
src: ['example/test/test.html'],
// Bail option
options: {
run: true
}
},

// Test page options
Expand Down
12 changes: 5 additions & 7 deletions README.md
Expand Up @@ -63,9 +63,7 @@ mocha: {

#### options.run
Type: `Boolean`
Default: `false`

**NOTE:** This will probably default to true in `0.5`.
Default: `true`

grunt-mocha injects a script into the PhantomJS instance that loads your HTML spec files. The file sets up a reporter and listeners so the output can be output in the command line. This option will call `mocha.run()` after the script is injected, ensuring that the proper listeners are setup.

Expand Down Expand Up @@ -272,12 +270,12 @@ Example:
```js
mocha: {
test: {
options: {
page: {
settings: {
options: {
page: {
settings: {
webSecurityEnabled: false, // disable cors checks in phantomjs
},
},
},
},
},
},
Expand Down
5 changes: 4 additions & 1 deletion tasks/mocha.js
Expand Up @@ -136,7 +136,10 @@ module.exports = function(grunt) {
// Log script errors as grunt errors
logErrors: false,
// Growl notification when tests pass.
growlOnSuccess: true
growlOnSuccess: true,
// Run tests, set to false if you would rather call `mocha.run` yourself
// due to async loading of your assets.
run: true,
});

// Output console messages if log == true
Expand Down

0 comments on commit 5095309

Please sign in to comment.