jdcataldo / grunt-mocha-phantomjs

A simple grunt wrapper for mocha-phantomjs to allow for ci integration
MIT License
70 stars 40 forks source link

What mocha options are supported #6

Closed davisford closed 11 years ago

davisford commented 11 years ago

Are the only two pass-through options that are supported the list of urls and the reporter?

mocha-phantomjs supports quite a few other options, is there any way to just allow a pass-through via grunt so they are all supported?

Usage: mocha-phantomjs [options] page

  Options:

    -h, --help                   output usage information
    -V, --version                output the version number
    -R, --reporter <name>        specify the reporter to use
    -t, --timeout <timeout>      specify the test startup timeout to use
    -A, --agent <userAgent>      specify the user agent to use
    -c, --cookie <name>=<value>  specify cookie
    -h, --header <name>=<value>  specify custom header
    -s, --setting <key>=<value>  specify specific phantom settings
    -v, --view <width>x<height>  specify phantom viewport size
    -C, --no-color               disable color escape codes
jdcataldo commented 11 years ago

All mocha-phantomjs options are supported.

Just pass them like so:

options: {
  timeout: 5000,
  view: '800x600'
}

Let me know if that doesnt work for you.

paulyoung commented 10 years ago

I'm trying to see if an issue I'm having is caused by ariya/phantomjs#10930.

What would be the correct way to set a header for Accept-Encoding: gzip;q=0?

jdcataldo commented 10 years ago

This should do the trick:

options: {
  header: 'Accept-Encoding=gzip;q=0'
}