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: export ErrorWrapper #1814

Merged
merged 1 commit into from Apr 7, 2021
Merged

feat: export ErrorWrapper #1814

merged 1 commit into from Apr 7, 2021

Conversation

phegman
Copy link
Contributor

@phegman phegman commented Mar 31, 2021

Export ErrorWrapper so it can be used when extending VTU.

At GitLab we have an extendedWrapper helper that we use to add custom finders and matchers. We are trying to add some DOM testing library finders to our extendedWrapper but one problem we are running into is ErrorWrapper is not exported so we have to do something like this. Ideally we would be able to do return new ErrorWrapper(query).

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

export `ErrorWrapper` so it can be used when extending VTU
@phegman
Copy link
Contributor Author

phegman commented Mar 31, 2021

Question: should dev/packages/test-utils/types/index.d.ts be updated for a change like this? Is there a way to generate typescript definitions, or are these manually maintained?

@lmiller1990
Copy link
Member

Hi! The types are manually maintained (not exactly ideal). You can update them if you like. If you want to, let me know when you want to merge. If not, I can merge this now and prepare a release soon.

@phegman
Copy link
Contributor Author

phegman commented Apr 7, 2021

@lmiller1990 thanks for the reply! I'm good with merging this as is. I'd be happy to help with the TypeScript definition later down the road if there is demand for it 🙂

@lmiller1990 lmiller1990 merged commit b8f796f into vuejs:dev Apr 7, 2021
@lmiller1990
Copy link
Member

I will do a release this week.

@phegman
Copy link
Contributor Author

phegman commented Apr 7, 2021

Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants