Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Able to run venus run command with PhantomJS #300

Merged
merged 3 commits into from
Oct 14, 2013
Merged

Able to run venus run command with PhantomJS #300

merged 3 commits into from
Oct 14, 2013

Conversation

roelrz
Copy link
Contributor

@roelrz roelrz commented Oct 12, 2013

This pull request is in reference to the following issue: #290

When defining commands and command line options with commander (https://npmjs.org/package/commander), it seems like the default case that was added to support running tests without the "run" command seemed to trump all other commands defined in Venus.js.

I went ahead and defined the command for the default case in it's own if clause that would only be executed if no commands are defined (e.g., "init", "demo", "run").

With the change, I was able to run the following commands successfully:

venus init
venus demo
venus run -t examples/mocha/Greeter/specs/Greeter.spec.js
venus run -t examples/mocha/Greeter/specs/Greeter.spec.js -n
venus examples/mocha/Greeter/specs/Greeter.spec.js
venus examples/mocha/Greeter/specs/Greeter.spec.js -n

@roelrz
Copy link
Contributor Author

roelrz commented Oct 12, 2013

I also added support to copy directories wholesale with @venus-resource annotation: #295

Let's say we have the following annotations at the top of a unit test:

/**
 * @venus-library mocha
 * @venus-resource data1.txt
 * @venus-resource foo/data2.txt
 * @venus-resource foo/bar/data3.txt
 * @venus-resource ../biz/data4.txt
 */

If the test is running on http://localhost:2013/venus-core/1, the resources will be available at the following URLs:

sethmcl added a commit that referenced this pull request Oct 14, 2013
Able to run venus run command with PhantomJS
@sethmcl sethmcl merged commit bf19325 into LinkedInAttic:master Oct 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants