Skip to content

test: [Do not merge] Example of failing test with stubbed global provide #1314

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paulmelero
Copy link
Contributor

@paulmelero paulmelero commented Jun 3, 2025

Caution

This PR should only serve as a reproduction for an issue I encountered with the API, but it's not fixing the issue and should not be merged as-is.

I think this is a reproduction for the case reported in #750, #1206, and #1102 (or some of them).

The main question this PR should answer is: How are we supposed to stub the value of a globally provided value?

In my experience, I could make it work by passing a provide property directly to the renderWithNuxt method (forcing the types), but it is inconsistent with the API used by tools like Vue Test Utils.

Failing test

https://github.com/nuxt/test-utils/actions/runs/15411633006/job/43364731048?pr=1314

Screensots

image

Copy link

pkg-pr-new bot commented Jun 3, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/test-utils@1314

commit: e61e985

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.

1 participant