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

Export all reporters publicly #3965

Closed
4 tasks done
joemull opened this issue Aug 16, 2023 · 0 comments · Fixed by #3980
Closed
4 tasks done

Export all reporters publicly #3965

joemull opened this issue Aug 16, 2023 · 0 comments · Fixed by #3980
Labels
enhancement New feature or request pr welcome

Comments

@joemull
Copy link

joemull commented Aug 16, 2023

Clear and concise description of the problem

As a developer using Vitest I would like reporters to be publicly exported so that I can more easily create custom reporters by inheriting from one and modifying just a few attributes or methods.

import { JsonReporter } from 'vitest/reporters'  // Something like this

modifyReport (report) {
  const modifiedReport = report
  return modifiedReport
}

export class GradescopeReporter extends JsonReporter {
  async writeReport (report) {
    super.writeReport(modifyReport(report))
  }
}

Suggested solution

Export all reporters publicly

Alternative

No response

Additional context

No response

Validations

@sheremet-va sheremet-va added enhancement New feature or request pr welcome labels Aug 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request pr welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants