Closed MarcoPasta closed 2 months ago
I am facing a similar issue (but for a Vue3 project, not an Angular). To show console output from the test, I had to use
vitest --disableConsoleIntercept=false
the following option (without false
did not work)
vitest --disableConsoleIntercept
However, disabling this option only shows console output in my test, but not console output from my Vue components
Hello @MarcoPasta. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction
will be closed if they have no activity within 3 days.
I don't think this is related to Vitest. I need an actual reproduction (a repository) that I can run without additional packages on top of it (like nx
).
I tried to create a minimal reproduction project with only installing the @analogjs/platform package and running
ng g @analogjs/platform:setup-vitest --project [your-project-name]
and it threw me the error that the @nx/devkit package is missing.
After installing the missing package i was able to run the tests with this result:
I tried setting it up in another minimal way but unfortunately i can't get it to run - can anyone help me out here?
Describe the bug
When i use console.log/debug/error in either the component or the tests itself i get no logs printed to the console, the terminal or in the ui. The project runs on Angular 17, i migrated to vitest using this guide: https://analogjs.org/docs/features/testing/vitest
My config:
I tried several methods using --silent=false, --disableConsoleIntercept, ----inspect-brk etc but non of them seemed to work. I installed jest alongside and console.logs are working here..
Reproduction
System Info
Used Package Manager
npm
Validations