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

Missing exports.lab causes error when generating html coverage report #399

rjrodger opened this issue Jul 9, 2015 · 1 comment


Copy link

@rjrodger rjrodger commented Jul 9, 2015

I forgot to 'exports.lab = ...' in one test file, and it caused error as below.
Adding the export removed the error.

Probably needs a more informative message?

$ ./node_modules/.bin/lab -P test -r html -o test/coverage.html

options.output.write('The file: ' + file + ' includes a lab sc
TypeError: Object test/coverage.html has no method 'write'
at /Users/richard/Projects/seneca/node_modules/lab/lib/cli.js:114:32
at Array.forEach (native)
at Object.internals.traverse (/Users/richard/Projects/seneca/node_modules/lab/lib/cli.js:99:19)
at (/Users/richard/Projects/seneca/node_modules/lab/lib/cli.js:48:29)
at Object. (/Users/richard/Projects/seneca/node_modules/lab/bin/lab:3:23)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3

@geek geek added the bug label Aug 4, 2015

This comment has been minimized.

Copy link

@geek geek commented Aug 4, 2015

Good point, we can make this error behave better with custom reporters.

Since the message is contained in the CLI, one option is to simply write to stderr

@geek geek added the help wanted label Aug 4, 2015
@geek geek added this to the 15.2.2 milestone Feb 9, 2018
@geek geek removed the help wanted label Feb 9, 2018
@geek geek self-assigned this Feb 9, 2018
@geek geek closed this in #810 Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.