nathanboktae / mocha-phantomjs

:coffee: :ghost: Run client-side mocha tests in the command line through phantomjs
MIT License
954 stars 112 forks source link

Unable to use query string with more then 1 argument in URL #154

Closed doberkofler closed 10 years ago

doberkofler commented 10 years ago

It seems impossible to use an URL with more then one argument in the query string:

mocha-phantomjs http://localhost:7777/main?p1=v1 works as expected

mocha-phantomjs http://localhost:7777/main?p1=v1&p2=v2 reports the following error: 'p2' is not recognized as an internal or external command

nathanboktae commented 10 years ago

Ampersand is a control character in shells. You need to quote it.

doberkofler commented 10 years ago

Right! How could I not have seen this. Unfortunately this is only working when invoking mocha-phantomjs from the command line but how would I use this when invoking it programmatically using spawn ? phantomjs lib/mocha-phantomjs.coffee <page> <reporter> <config-as-JSON>