javascript - How can I set the viewport size of PhantomJS through grunt & jasmine? -
i'm trying test using grunt + jasmine + phantomjs. specific test requires large viewport responsive styles render large-screen version within phantomjs.
i noticed in grunt-contrib-jasmine
plugin code, seem allow setting phantomjs options:
// merge task-specific options these defaults. var options = this.options({ ... phantomjs : {}, ... });
however, when add config in grunt has no effect:
options: { phantomjs: { viewportsize: { width: 2000, height: 1000 } } }
the answer lies in fact viewportsize
option page
object, not phantomjs. grunt config needs this:
taskname: { options: { page: { viewportsize: { width: 2000, height: 800 } }, ... }
Comments
Post a Comment