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

No custom test reporters #862

Closed
k-makarov opened this issue Apr 4, 2016 · 8 comments
Closed

No custom test reporters #862

k-makarov opened this issue Apr 4, 2016 · 8 comments

Comments

@k-makarov
Copy link

Like mocha`s:

Spec
Nyan
Dot Matrix
TAP
etc.

@cpojer
Copy link
Member

cpojer commented Apr 4, 2016

Unfortunately we are not currently planning on working on this. If you'd like to help out and add more custom test reporter features, I'd be happy to work with you on a Pull Request :)

@cpojer
Copy link
Member

cpojer commented May 13, 2016

Closing this because there has been a month of inactivity. Happy to receive pull requests for this if anyone is interested in working on it.

@cpojer cpojer closed this as completed May 13, 2016
@hakunin
Copy link

hakunin commented Aug 25, 2016

This is how I worked it around:

in package.json

  "jest": {
    "setupTestFrameworkScriptFile": "./test/setup_framework.js",

In setup_framework.js:

  jasmine.getEnv().addReporter(reporter);  // add your reporter
  jasmine.getEnv().addReporter = () => {}; // prevent Jest from adding their reporter

This works as Jasmine adds their reporter afterwards.

Also check out this: jasmine/jasmine#1183

Since you can only add reporters to jasmine and not remove them, this workaround might stop working at some point if Jest decided the add the reporter before the file mentioned.

Update this doesn't quite work as running the whole suite does not seem to finish (single files do).

@shinzui
Copy link

shinzui commented Feb 11, 2017

Could we reopen this now that Jest is popular? I would love to consolidate on using jest for testing node apps, but this is a major blocker. The current hacks of using jasmine-reporters should not be the solution for an important task of a test framework.

@eranimo
Copy link
Contributor

eranimo commented Mar 25, 2017

"zero configuration" really doesn't have to mean "no configuration".

@TAGC
Copy link

TAGC commented Jun 27, 2017

I'm not going to lie, I just want this implemented so I can use the nyan cat reporter.

@SimenB
Copy link
Member

SimenB commented Jun 27, 2017

You can use custom reporters in jest@20. https://facebook.github.io/jest/docs/en/configuration.html#reporters-array-modulename-modulename-options, #3349

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants