Skip to content

Conversation

@alexismch
Copy link
Contributor

@alexismch alexismch commented Oct 29, 2025

What is it?

  • Feature / enhancement

Description

This PR introduces a new loaders prop on QwikCityMockProvider.
This will allow devs to implement tests on components using loaders and provide mocked data returned by the loaders.

Testing the component, without the mock:

Screenshot 2025-10-29 at 23 29 14 Screenshot 2025-10-29 at 23 31 27

Testing the component, with the mock:

Screenshot 2025-10-29 at 23 31 53 Screenshot 2025-10-29 at 23 32 52

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

🦋 Changeset detected

Latest commit: 59a1549

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@builder.io/qwik-city Minor
eslint-plugin-qwik Minor
@builder.io/qwik Minor
create-qwik Minor
@builder.io/qwik-react Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@alexismch alexismch marked this pull request as ready for review October 30, 2025 09:01
@alexismch alexismch requested review from a team as code owners October 30, 2025 09:01
@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview ba7a5b5

Copy link
Member

@maiieul maiieul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Just some minor changes and I think we can merge. I will discuss with the core team and Misko next meeting first. This looks reasonable so we might be able to merge without going through an RFC.

Thanks @alexismch 🙌

@alexismch alexismch changed the title feat(QwikCityMockProvider): custom loaders mocks feat(QwikCityMockProvider): custom loaders & actions mocks Oct 31, 2025
wmertens
wmertens previously approved these changes Nov 3, 2025
Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 3, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@builder.io/qwik@8102
npm i https://pkg.pr.new/@builder.io/qwik-city@8102
npm i https://pkg.pr.new/eslint-plugin-qwik@8102
npm i https://pkg.pr.new/create-qwik@8102

commit: ba7a5b5

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.

3 participants