Type: String|Array
Your source files. These are the files that you are testing. If you are using RequireJS your source files will be loaded as dependencies into your spec modules and will not need to be placed here.
Type: String|Array
Your Jasmine specs.
Type: String|Array
Third party libraries like jQuery & generally anything loaded before source, specs, and helpers.
Type: String|Array
Non-source, non-spec helper files. In the default runner these are loaded after vendor
files
Type: String|Array
CSS files that get loaded after the jasmine.css
Type: String
Default: 'latest'
This is the version of Jasmine which will be used. Available versions are published to npm.
Type: String
Default: .grunt/grunt-contrib-jasmine
The temporary directory that runners use to load jasmine files. Automatically deleted upon normal runs.
Type: String
Default: _SpecRunner.html
The auto-generated specfile that Headless Chrome will use to run your tests.
Automatically deleted upon normal runs. Use the :build
flag to generate a SpecRunner manually e.g.
grunt jasmine:myTask:build
Type: Boolean
Default: false
Prevents the auto-generated specfile used to run your tests from being automatically deleted.
Type: String
Default: undefined
Path to output JUnit xml
Type: Boolean
Default: false
Consolidate the JUnit XML so that there is one file per top level suite.
Type: String
Default: undefined
Specify a custom JUnit template instead of using the default junitTemplate
.
Type: String
Default: ''
The host you want Headless Chrome to connect against to run your tests.
e.g. if using an ad hoc server from within grunt
host : 'http://127.0.0.1:8000/'
Without a host
, your specs will be run from the local filesystem.
Type: String
Object
Default: undefined
Custom template used to generate your Spec Runner. Parsed as underscore templates and provided the expanded list of files needed to build a specrunner.
You can specify an object with a process
method that will be called as a template function.
See the Template API Documentation for more details.
Type: Object
Default: {}
Options that will be passed to your template. Used to pass settings to the template.
Type: String|Array
Third party polyfill libraries like json2 that are loaded at the very top before anything else.
Type: String
Default: 'full'
full
displays the full specs treeshort
only displays a success or failure character for each test (useful with large suites)none
displays nothing
Type: Object
Default: { args: [] }
Pass arugments to puppeteer launcher. For the list of available options, please look at puppeteer launch options.
Example sandboxArgs
object:
{
args: {
'=-allow-file-access-from-files'
},
executeablePath: '/some/other/path/to/chrome'
}
Type: Boolean
Default: false
Display a list of all failed tests and their failure messages
Name: build
Turn on this flag in order to build a SpecRunner html file. This is useful when troubleshooting templates, running in a browser, or as part of a watch chain e.g.
watch: {
pivotal : {
files: ['src/**/*.js', 'specs/**/*.js'],
tasks: 'jasmine:pivotal:build'
}
}
filename
grunt jasmine --filter=foo
will run spec files that have foo
in their file name.
folder
grunt jasmine --filter=/foo
will run spec files within folders that have foo*
in their name.
wildcard
grunt jasmine --filter=/*-bar
will run anything that is located in a folder *-bar
comma separated filters
grunt jasmine --filter=foo,bar
will run spec files that have foo
or bar
in their file name.
flags with space
grunt jasmine --filter="foo bar"
will run spec files that have foo bar
in their file name.
grunt jasmine --filter="/foo bar"
will run spec files within folders that have foo bar*
in their name.