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

feat(reporters): summary option for verbose and default reporters #6893

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

AriPerkkio
Copy link
Member

Description

Adds new summary: boolean option for verbose and default reporters. This option enables test summary that is shown below test results. This option is enabled by default. I would not consider this as breaking change, rather as bug fix for issues linked above.

import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    reporters: [
      ['verbose', { summary: true }],

      // or
      ['default', { summary: true }],
    ],
  },
})

Running Vitest's test/core tests - left one is main, right one is this PR:

vitest-reporter-before-and-after.webm

Most of the changes are related to listRenderer.ts removal. This is replaced with windowedRenderer.ts. After this PR we should do similar changes for dotRenderer and tableRenderer, and remove whole log-update from Vitest core.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Copy link

netlify bot commented Nov 11, 2024

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4509988
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/67360f1332f7d00008287656
😎 Deploy Preview https://deploy-preview-6893--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

pkg-pr-new bot commented Nov 11, 2024

@vitest/browser

pnpm add https://pkg.pr.new/@vitest/browser@6893

@vitest/coverage-istanbul

pnpm add https://pkg.pr.new/@vitest/coverage-istanbul@6893

@vitest/expect

pnpm add https://pkg.pr.new/@vitest/expect@6893

@vitest/coverage-v8

pnpm add https://pkg.pr.new/@vitest/coverage-v8@6893

@vitest/mocker

pnpm add https://pkg.pr.new/@vitest/mocker@6893

@vitest/pretty-format

pnpm add https://pkg.pr.new/@vitest/pretty-format@6893

@vitest/runner

pnpm add https://pkg.pr.new/@vitest/runner@6893

@vitest/snapshot

pnpm add https://pkg.pr.new/@vitest/snapshot@6893

@vitest/spy

pnpm add https://pkg.pr.new/@vitest/spy@6893

@vitest/ui

pnpm add https://pkg.pr.new/@vitest/ui@6893

@vitest/utils

pnpm add https://pkg.pr.new/@vitest/utils@6893

vite-node

pnpm add https://pkg.pr.new/vite-node@6893

vitest

pnpm add https://pkg.pr.new/vitest@6893

@vitest/web-worker

pnpm add https://pkg.pr.new/@vitest/web-worker@6893

@vitest/ws-client

pnpm add https://pkg.pr.new/@vitest/ws-client@6893

commit: b425801

@AriPerkkio AriPerkkio force-pushed the feat/reporter-something-new branch 7 times, most recently from 5629c8f to 9f5803e Compare November 11, 2024 19:17
docs/guide/reporters.md Show resolved Hide resolved
docs/guide/reporters.md Outdated Show resolved Hide resolved
@AriPerkkio AriPerkkio force-pushed the feat/reporter-something-new branch 2 times, most recently from 0e315ff to 77e34b2 Compare November 12, 2024 09:49
@sheremet-va
Copy link
Member

sheremet-va commented Nov 13, 2024

Merged PR that affects the output: #6805 (it now prints a result.note message instead of [skip]) - this should probably only affect the output when there is only one test file running tests

@AriPerkkio AriPerkkio force-pushed the feat/reporter-something-new branch 3 times, most recently from b7a381c to db6ec84 Compare November 14, 2024 13:39
@AriPerkkio AriPerkkio marked this pull request as ready for review November 14, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants