Skip to content

Adding additional information to tap output #2220

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

Closed
smyth64 opened this issue Aug 20, 2019 · 3 comments
Closed

Adding additional information to tap output #2220

smyth64 opened this issue Aug 20, 2019 · 3 comments

Comments

@smyth64
Copy link

smyth64 commented Aug 20, 2019

In my tap output I get this:

# test › Make test
not ok 22 - test › Make test
  ---
    name: AssertionError
    assertion: assert
    operator: '!!'
    values:
      'Value is not truthy:': 'false'
    at: |-
      assert (test/services/test/test.js:47:7)
      t (test/services/test.js:40:14)
  ...

But what I want is additional information that I can parse later to a JSON.
I tried it with test.log() but it always prefixes an asterisk (*) so the default tap-parser ignores it =/

# test › Make test
not ok 22 - test › Make test
  * ---
  * lala: lolo
  * ...
  ---
    name: AssertionError
    assertion: assert
    operator: '!!'
    values:
      'Value is not truthy:': 'false'
    at: |-
      assert (test/services/test/test.js:47:7)
      t (test/services/test.js:40:14)
  ...

Is it impossible to add just some payload to the tap output? This is so inflexible...

@smyth64 smyth64 changed the title Adding additional output to tap Adding additional information to tap output Aug 20, 2019
@sindresorhus
Copy link
Member

What kind of additional information?

@smyth64
Copy link
Author

smyth64 commented Aug 20, 2019

What kind of additional information?

For example IDs or data that's generated while testing. I test an external service and I want to add the logs of the output to my tap output.

@novemberborn
Copy link
Member

Please see my answer here: #2219 (comment)

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

3 participants