iamchrismiller / grunt-casper

Run CasperJS Scripts/Functional Tests
Other
69 stars 38 forks source link

Passing in templated args causes error #25

Closed tysonnero closed 9 years ago

tysonnero commented 10 years ago

When I try to pass in templated args, Grunt is erroring out.

Ex: args : [ '--port=<%= test.port%>' ]

Produces this error: An error occurred while processing a template (_ is not defined)

iamchrismiller commented 10 years ago

You shouldn't need -- before port.. Thats only when specifying options. What version of grunt / grunt-cli are you using?

Check this out http://docs.casperjs.org/en/latest/testing.html#test-command-args-and-options

tysonnero commented 10 years ago

I'm on v0.1.10.

When I simply use --port=xxxx, it runs fine. I'll try it w/o the -- but I thought that it would cause Casper to treat it as a file.

tysonnero commented 10 years ago

The build server which is actually having the issue is v0.1.13.

iamchrismiller commented 10 years ago

Because you want it as an option.. I may need to allow more options in the options hash.. You can submit a pull request if you like. I explicitly allow test options.

{ ... { args : [ "foo <%= foo.bar %>"] } }

I tried that and it worked as expected

casper : 1.1.0-beta3 grunt-cli v0.1.13 grunt v0.4.2

tysonnero commented 10 years ago

Okay, maybe I will do a PR :-)

Also, were using grunt v0.4.1 if that matters at all.

iamchrismiller commented 9 years ago

Closing as this is not an issue. Upgrading to latest works as expected. Please re-open if you are still experiencing this issue.