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

Logs in beforeAll missing from HTML report #3366

Closed
6 tasks done
timbrinded opened this issue May 13, 2023 · 1 comment · Fixed by #5288
Closed
6 tasks done

Logs in beforeAll missing from HTML report #3366

timbrinded opened this issue May 13, 2023 · 1 comment · Fixed by #5288
Labels
feat: ui Vitest UI p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@timbrinded
Copy link

Describe the bug

When printing logs in the beforeAll() block, they are not attributed to the test suite they are contained within. As a result when using the html reporter, log lines are not captured. e.g.:

stdout | unknown test
Logging in beforeAll

vs

stdout | test/suite.test.ts > suite name > foo
Logging in test

Reproduction

Link to stackbitz

here you'll see that the logs generated in the beforeall block arent attributed to the suite test, therefore they are not captured in the generated HTML logs

System Info

System:
    OS: Linux 5.19 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (16) x64 Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz
    Memory: 32.92 GB / 46.84 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 3.2.0 - ~/.yarn/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Brave Browser: 113.1.51.110
    Chrome: 113.0.5672.63
    Firefox: 112.0.2
  npmPackages:
    @vitest/ui: ^0.31.0 => 0.31.0 
    vitest: ^0.31.0 => 0.31.0

Used Package Manager

pnpm

Validations

@stackblitz
Copy link

stackblitz bot commented May 13, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@sheremet-va sheremet-va added feat: ui Vitest UI p3-minor-bug An edge case that only affects very specific usage (priority) and removed bug labels Feb 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: ui Vitest UI p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants