Skip to content

Conversation

@jribbink
Copy link
Contributor

@jribbink jribbink commented Nov 24, 2025

Closes #1595
Closes #1611

  • Adds a tutorial for the forked emulator usage as a standalone (e.g. without the Cadence test framework)
  • Adds documentation for dependency mocking in both Flow Emulator & Cadence Test Framework

@vercel
Copy link

vercel bot commented Nov 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Dec 12, 2025 6:48pm

@jribbink jribbink marked this pull request as ready for review December 9, 2025 17:10
@jribbink jribbink changed the title Add Interactive Testing With Forked Emualator Docs Improvements for Mainnet Forking Docs Dec 9, 2025
@jribbink jribbink marked this pull request as draft December 10, 2025 17:42
@jribbink jribbink marked this pull request as ready for review December 11, 2025 00:08

Just like mocking dependencies in unit tests, you can **mock real mainnet contracts** by deploying modified versions—perfect for testing upgrades, bug fixes, or alternative implementations against real production state.

Configure the mock in `flow.json`, then deploy to the forked emulator. Your mock takes precedence while other contracts use real mainnet versions.
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we overriding FlowToken in this example? Can we provide the code for the mock contract and run it?

It can be simple.

Copy link
Contributor

@briandoyle81 briandoyle81 left a comment

Choose a reason for hiding this comment

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

Great overall, requested some changes inline!


# Interactive Testing with Forked Emulator

This tutorial teaches you how to run your app, E2E tests, and manual explorations against a snapshot of Flow mainnet using `flow emulator --fork`. You'll learn how to connect your frontend to production-like state, test user flows with real contracts and data, and debug issues interactively—all without deploying to a live network.
Copy link
Member

Choose a reason for hiding this comment

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

Would explain the why forking here more

@jribbink jribbink enabled auto-merge (squash) December 12, 2025 18:47
@jribbink jribbink dismissed briandoyle81’s stale review December 12, 2025 18:48

addressing in follow up PR

@jribbink jribbink merged commit 37fc5fe into main Dec 12, 2025
3 checks passed
@jribbink jribbink deleted the jribbink/fork-emu branch December 12, 2025 18:48
@jribbink
Copy link
Contributor Author

follow up PR here, still working on it but these comments have not been forgotten
#1620

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.

Document mocking forked dependencies Add flow emulator fork testing tutorial

4 participants