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

Custom reporters not allowed from cli #415

Closed
geek opened this issue Aug 4, 2015 · 4 comments
Assignees
Labels
bug
Milestone

Comments

@geek
Copy link
Member

@geek geek commented Aug 4, 2015

Need to allow custom reporters to be allowed by the CLI, as reported by the readme

@geek geek added the bug label Aug 4, 2015
@geek geek self-assigned this Aug 4, 2015
@geek geek added this to the 5.14.1 milestone Aug 4, 2015
@geek geek closed this in #416 Aug 4, 2015
@PizzaBrandon

This comment has been minimized.

Copy link

@PizzaBrandon PizzaBrandon commented Aug 20, 2015

Sorry to bother on a closed ticket, but I'm not sure if what I'm dealing with is a related bug or if I'm using this incorrectly.

I just wrote and published a Lab reporter for Bamboo, installed it locally on a package I'm attempting to test, installed lab globally (verified it's 5.15.1), and ran lab -r lab-bamboo-reporter. It gave me the following error:

~/workspaces/project-under-test$ lab -r lab-bamboo-reporter
module.js:338
    throw err;
          ^
Error: Cannot find module 'lab-bamboo-reporter'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.internals.requireReporter (/Users/###/.nvm/versions/node/v0.12.7/lib/node_modules/lab/lib/reporters/index.js:34:12)
    at Object.exports.generate (/Users/###/.nvm/versions/node/v0.12.7/lib/node_modules/lab/lib/reporters/index.js:59:65)
    at Object.exports.report (/Users/###/.nvm/versions/node/v0.12.7/lib/node_modules/lab/lib/runner.js:58:30)
    at Object.exports.run (/Users/###/.nvm/versions/node/v0.12.7/lib/node_modules/lab/lib/cli.js:49:19)
    at Object.<anonymous> (/Users/###/.nvm/versions/node/v0.12.7/lib/node_modules/lab/bin/lab:3:23)
    at Module._compile (module.js:460:26)
    ...

But if I run lab -r ./node_modules/lab-bamboo-reporter, it succeeds.

Am I reading the usage instructions wrong and lab expects the plugin to be installed globally or is this a bug in the implementation?

@geek

This comment has been minimized.

Copy link
Member Author

@geek geek commented Aug 20, 2015

Interesting. What if you install locally and run lab? I like to avoid global installs and just use the local binaries. If you don't have the path setup for ./node_modules/.bin then you can run as:

./node_modules/.bin/lab -r lab-bamboo-reporter

I wonder if this is an issue with the global install not respecting the current working directory.

@PizzaBrandon

This comment has been minimized.

Copy link

@PizzaBrandon PizzaBrandon commented Aug 20, 2015

$ ./node_modules/.bin/lab -r lab-bamboo-reporter gives the correct test result output.

@PizzaBrandon

This comment has been minimized.

Copy link

@PizzaBrandon PizzaBrandon commented Aug 20, 2015

I will amend my package's usage instructions to match this requirement, but I do hope you are able to find a solution that allows the global install to also work since the readme recommends it as a best practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.