kmiyashiro / grunt-mocha

[MOVED] Grunt task for running mocha specs in a headless browser (PhantomJS)
MIT License
370 stars 106 forks source link

Merge phantomjs page settings from Grunt config #133

Closed sessio closed 9 years ago

sessio commented 9 years ago

Allow PhantomJS Page settings to be defined in grunt options and merged with webpage instance. for example: options: { page: { settings: { webSecurityEnabled: false } } }

(in pr #62, if you wanted to change a setting the whole settings-object would get overwritten and this broke things at least for me)

kmiyashiro commented 9 years ago

Why page? Also, could you add to the readme?

kmiyashiro commented 9 years ago

Oh I see, #62... ok makes sense. Could you please document this in the readme?

sessio commented 9 years ago

I'll write up a section to readme.md and update this pr. Also if you have a better suggestion for the naming scheme in grunt options i'm open to suggestions

sessio commented 9 years ago

I'm not sure if there is anything else anyone would need to change except the settings object, maybe merging the whole page object is a bit overkill? Trying to think of a way to write tests to this as well.

sessio commented 9 years ago

Made a test with userAgent overriding via settings

kmiyashiro commented 9 years ago

Cool, appears to work for me. Thanks!