2012-11-02 13:03:09 +08:00
|
|
|
# Options
|
|
|
|
|
2012-11-02 13:03:09 +08:00
|
|
|
## src
|
|
|
|
Type: `String|Array`
|
|
|
|
|
2013-03-11 13:15:29 +08:00
|
|
|
*Minimatch* - Your source files. These are the files that you are testing.
|
2012-11-02 13:03:09 +08:00
|
|
|
|
|
|
|
## options.specs
|
|
|
|
Type: `String|Array`
|
|
|
|
|
2013-03-11 13:15:29 +08:00
|
|
|
*Minimatch* - Your Jasmine specs.
|
2012-11-02 13:03:09 +08:00
|
|
|
|
|
|
|
## options.vendor
|
|
|
|
Type: `String|Array`
|
|
|
|
|
2013-03-11 13:15:29 +08:00
|
|
|
*Minimatch* - Third party libraries, generally loaded before anything else happens in your tests. Libraries
|
|
|
|
like jQuery and Backbone.
|
2012-11-02 13:03:09 +08:00
|
|
|
|
|
|
|
## options.helpers
|
|
|
|
Type: `String|Array`
|
|
|
|
|
2013-03-11 13:15:29 +08:00
|
|
|
*Minimatch* - Non-source, non-spec helper files. In the default runner these are loaded after `vendor` files
|
|
|
|
|
|
|
|
## options.styles
|
|
|
|
Type: `String|Array`
|
|
|
|
|
|
|
|
*Minimatch* - CSS files that get loaded after the jasmine.css
|
2012-11-02 13:03:09 +08:00
|
|
|
|
2013-04-05 01:57:11 +08:00
|
|
|
## options.version
|
|
|
|
Type: `String`
|
|
|
|
Default: '1.3.1'
|
|
|
|
|
|
|
|
This is the jasmine-version which will be used. currently available versions are:
|
|
|
|
|
|
|
|
* 1.0.0
|
|
|
|
* 1.1.0
|
|
|
|
* 1.2.0
|
|
|
|
* 1.3.0
|
|
|
|
* 1.3.1
|
|
|
|
|
2012-11-02 13:03:09 +08:00
|
|
|
## options.outfile
|
|
|
|
Type: `String`
|
|
|
|
Default: `_SpecRunner.html`
|
|
|
|
|
2013-03-11 13:15:29 +08:00
|
|
|
The auto-generated specfile that phantomjs will use to run your tests.
|
|
|
|
Automatically deleted upon normal runs
|
2013-01-09 03:28:26 +08:00
|
|
|
|
|
|
|
## options.junit.path
|
|
|
|
Type: `String`
|
|
|
|
Default: undefined
|
|
|
|
|
|
|
|
Path to output JUnit xml
|
|
|
|
|
|
|
|
## options.junit.consolidate
|
|
|
|
Type: `Boolean`
|
|
|
|
Default: `false`
|
|
|
|
|
|
|
|
Consolidate the JUnit XML so that there is one file per top level suite.
|
2012-11-02 13:03:09 +08:00
|
|
|
|
2012-11-02 13:03:09 +08:00
|
|
|
## options.host
|
|
|
|
Type: `String`
|
|
|
|
Default: ''
|
2012-11-02 13:03:09 +08:00
|
|
|
|
2013-03-11 13:15:29 +08:00
|
|
|
The host you want phantomjs to connect against to run your tests.
|
2012-11-02 13:03:09 +08:00
|
|
|
|
2012-11-02 13:03:09 +08:00
|
|
|
e.g. if using an ad hoc server from within grunt
|
2012-11-02 13:03:09 +08:00
|
|
|
|
2012-11-02 13:03:09 +08:00
|
|
|
```js
|
2012-12-03 16:17:06 +08:00
|
|
|
host : 'http://127.0.0.1:8000/'
|
2012-11-02 13:03:09 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
Or, using templates
|
|
|
|
|
|
|
|
```js
|
2012-12-03 16:17:06 +08:00
|
|
|
host : 'http://127.0.0.1:<%= connect.port %>/'
|
2012-11-02 13:03:09 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
Not defining a host will mean your specs will be run from the local filesystem.
|
|
|
|
|
|
|
|
## options.template
|
2013-01-09 03:28:26 +08:00
|
|
|
Type: `String` `Object`
|
|
|
|
Default: undefined
|
2012-11-02 13:03:09 +08:00
|
|
|
|
2013-03-11 13:15:29 +08:00
|
|
|
Custom template used to generate your Spec Runner. Parsed as underscore templates and provided
|
2012-11-02 13:03:09 +08:00
|
|
|
the expanded list of files needed to build a specrunner.
|
2012-11-02 13:03:09 +08:00
|
|
|
|
2013-01-09 03:28:26 +08:00
|
|
|
You can specify an object with a `process` method that will be called as a template function.
|
2013-01-10 13:14:50 +08:00
|
|
|
See the [Template API Documentation](https://github.com/gruntjs/grunt-contrib-jasmine/wiki/Jasmine-Templates) for more details.
|
2013-01-09 03:28:26 +08:00
|
|
|
|
2012-11-02 13:03:09 +08:00
|
|
|
## options.templateOptions
|
|
|
|
Type: `Object`
|
|
|
|
Default: `{}`
|
2012-11-02 13:03:09 +08:00
|
|
|
|
2013-03-11 13:15:29 +08:00
|
|
|
Options that will be passed to your template via an 'options' hash. Used to pass settings to the template.
|
2012-11-02 13:03:09 +08:00
|
|
|
|
2012-11-09 08:57:30 +08:00
|
|
|
# Flags
|
|
|
|
|
|
|
|
Name: `build`
|
|
|
|
|
2013-03-11 13:15:29 +08:00
|
|
|
Turn on this flag in order to rebuild the specrunner without deleting it. This is useful when troubleshooting templates,
|
2012-12-03 16:17:06 +08:00
|
|
|
running in a browser, or as part of a watch chain e.g.
|
2012-11-09 08:57:30 +08:00
|
|
|
|
|
|
|
```js
|
2012-12-03 16:17:06 +08:00
|
|
|
watch: {
|
|
|
|
pivotal : {
|
|
|
|
files: ['src/**/*.js', 'specs/**/*.js'],
|
|
|
|
tasks: 'jasmine:pivotal:build'
|
2012-11-09 08:57:30 +08:00
|
|
|
}
|
2012-12-03 16:17:06 +08:00
|
|
|
}
|
2012-11-09 08:57:30 +08:00
|
|
|
```
|