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

Please add a --stdout and --stderr to the tap runner #3

Closed
mcavage opened this issue Jul 8, 2011 · 10 comments
Closed

Please add a --stdout and --stderr to the tap runner #3

mcavage opened this issue Jul 8, 2011 · 10 comments

Comments

@mcavage
Copy link

mcavage commented Jul 8, 2011

It's really useful to be able to get my console.log()'s to show up when writing tests, until stuff is in a "steady state".

@dominictarr
Copy link

essential!

+1

@timoxley
Copy link

you can kind of get around this by exporting an environment var on your shell:

export TAP_DIAG=1

and you'll get the truncated console output as well as some other diagnostic info.

@timoxley
Copy link

also, another BS workaround is to:

throw util.inspect(someObject)

not remotely a good solution but is currently getting me the object inspection I need

@mvolkmann
Copy link

Setting TAP_DIAG works, but it of course causes much more output than is desired.
The inability to use console.log in test code and in the code being tested is a serious issue for debugging!

@konobi
Copy link

konobi commented Nov 10, 2011

+1

1 similar comment
@jdeal
Copy link

jdeal commented Nov 12, 2011

+1

@dominictarr
Copy link

I've added a --debug option which pipes stderr through from your tests.

+1 these two pull requests:

isaacs/tap-runner#4
#15

@kusor
Copy link
Contributor

kusor commented Nov 15, 2011

+1

@autarch
Copy link

autarch commented Dec 3, 2011

Should this even require an option? I think that stderr should probably just be emitted as is.

For debugging, it'd be nice to have a test.diag() function which outputted TAP diagnostics (http://testanything.org/wiki/index.php/TAP_specification#Diagnostics)

This is somewhat separate from outputting stderr, though.

jhs pushed a commit to iriscouch/node-tap that referenced this issue Dec 5, 2011
Correct test.doesNotThrow() so it doesn't explode node-tap
@jeffbski
Copy link

I also have a pull request which forwards stderr all the time and includes a test to verify.

#31

FYI. Also for any of those who need this asap, you can use my tap runner (tapr) which provides stderr and stdout, optional colorized output, and a cleaner assert formatting. It was based on the original tap runner and still uses all other original tap components just with a customized runner. There are some screenshots on my github page https://github.com/jeffbski/tapper and it is available in npm as tapr

@isaacs isaacs closed this as completed in bdc03c6 Jan 8, 2012
isaacs pushed a commit that referenced this issue Sep 1, 2023
* chore: bump @npmcli/template-oss from 3.4.2 to 3.4.3

Bumps [@npmcli/template-oss](https://github.com/npm/template-oss) from 3.4.2 to 3.4.3.
- [Release notes](https://github.com/npm/template-oss/releases)
- [Changelog](https://github.com/npm/template-oss/blob/main/CHANGELOG.md)
- [Commits](npm/template-oss@v3.4.2...v3.4.3)

---
updated-dependencies:
- dependency-name: "@npmcli/template-oss"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: postinstall for dependabot template-oss PR

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: npm team <ops+robot@npmjs.com>
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

No branches or pull requests

10 participants