Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Console.log - not output in console #92

Closed
matprzybyla opened this issue Sep 29, 2020 · 5 comments
Closed

Console.log - not output in console #92

matprzybyla opened this issue Sep 29, 2020 · 5 comments

Comments

@matprzybyla
Copy link

Things to consider before raising a bug
Typescript/react tests

Describe the bug
This is just a question if this feature is supported. While running npm run test from cmd line I get console logs in output.
When I use Jest Test Explorer no console output is logged anywhere in VSCode.
Is there some options/features to check to get it workig?

Additionally hen test run fails, test are "disabled" in explorer and no info is written enywhere

To Reproduce
Select any test from exporer and run or debug.

Expected behavior
Output from test written in console. All console.logs should be in output.

Desktop (please complete the following information):

  • OS: Window 10
  • Typescript 3.9.7
  • node 12
@rossknudsen
Copy link

rossknudsen commented Sep 30, 2020

I want that feature too. The extension vscode-jest has this capability. I'm working on hooking this extension up to that one through jest-community/vscode-jest#625. You should consider up-voting it.

@matprzybyla
Copy link
Author

Thanks for info.
Liking Jest Test Explorer very much but the limited verbocity when running tests is some issue (hopefully nit for long).

Worked also with Mocha test explorer before and it had VCS Mocha Tests debug console that it could output tests.
Is this also possible with Jest Test explorer by some config option?

@rossknudsen
Copy link

@matprzybyla I've just pushed a new release today which basically covers this feature. You'll need to make sure you're on v0.8.0 from the marketplace. I'll close this issue now, but if you find that it doesn't work as expected, please either reopen this ticket, or in the case of a specific defect, feel free to open another ticket.

Basically you should get the test output in an Output Window in VSCode.

@matprzybyla
Copy link
Author

Hi @rossknudsen thanks for update.
I can see Jest console in VSC terminal output and it logs there.

Awesome job, thanks a lot!

@AlvesJorge
Copy link

Hi Ross, thanks for the work on the extension!
Is this feature supposed to work with debug mode also? I can't seem to log anything there.
Also, am I missing something or is there no syntax highlighting on the output window?
Cheers

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

3 participants