theintern / cli

The command line interface for Intern
Other
3 stars 4 forks source link

"intern help run" cannot resolve digdug/Tunnel #1

Closed rodneyrehm closed 4 years ago

rodneyrehm commented 8 years ago

As far as I understand, the following should print the help page for the run command

npm install intern intern-cli
./node_modules/.bin/intern help run

Instead I'm seeing the following

➜  ./node_modules/.bin/intern help run

Usage: run [options]

Run tests in Node or in a browser using WebDriver

Options:

-h, --help                        output usage information
-b, --bail                        quit after the first failing test
-c, --config <module ID|file>     config file to use (default is tests/intern.js)
-f, --fsuites <module ID>         specify a functional suite to run (can be used multiple times)
-g, --grep <regex>                filter tests by ID
-l, --leaveRemoteOpen             leave the remote browser open after tests finish
-r, --reporters <name|module ID>  specify a reporter (can be used multiple times)
-s, --suites <module ID>          specify a suite to run (can be used multiple times)
-w, --webdriver                   use the WebDriver runner (default is Node client)
-I, --noInstrument                disable instrumentation
--debug                           enable the Node debugger
--proxyOnly                       start Intern's test server, but don't run any tests
--timeout <int>                   set the default timeout for async tests
--tunnel <name>                   use the given tunnel for WebDriver tests

Tests may be run purely in Node using the Node client, or in a browser using
the WebDriver runner.

The Node client runs tests purely in Node rather than in a browser. This
makes it well suited for quickly running tests that do not involve the DOM,
and and for testing code meant to run in a server environment. Only unit
tests will be run when using the Node client.

The WebDriver runner starts and controls a browser using the WebDriver
protocol. This requires that either a local instance of Selenium is running
or that Intern has been configured to run tests on a cloud testing service.
Both unit and functional tests will be run when using the WebDriver runner.

Reporters:

Cobertura, Combined, Console, Html, JUnit, Lcov, LcovHtml, Pretty, Runner,
TeamCity, WebDriver

/…/node_modules/intern-cli/node_modules/resolve/lib/sync.js:33
throw new Error("Cannot find module '" + x + "' from '" + y + "'");
^

Error: Cannot find module 'digdug/Tunnel' from '/Users/rodneyrehm/projects/test.dev/htdocs/intern-cli-test'
at Function.module.exports [as sync] (/…/node_modules/intern-cli/node_modules/resolve/lib/sync.js:33:11)
at Command.<anonymous> (/…/node_modules/intern-cli/bin/intern.js:376:51)
at emitNone (events.js:67:13)
at Command.emit (events.js:166:7)
at Command.outputHelp (/…/node_modules/intern-cli/node_modules/commander/index.js:1024:8)
at Command.help (/…/node_modules/intern-cli/node_modules/commander/index.js:1034:8)
at Command.<anonymous> (/…/node_modules/intern-cli/bin/intern.js:134:12)
at emitTwo (events.js:87:13)
at Command.emit (events.js:172:7)
at Command.parseArgs (/…/node_modules/intern-cli/node_modules/commander/index.js:615:12)

Unless I'm mistaking, this is expecting digdug to be installed as a dependency of intern-cli or anywhere up the chain. But it actually is installed as a dependency of intern. Changing the lookup to intern/node_modules/digdug/Tunnel properly prints the help.

jason0x43 commented 4 years ago

Closing this as the current CLI code in https://github.com/theintern/intern does show reporters.