cloudflare / miniflare

🔥 Fully-local simulator for Cloudflare Workers. For the latest version, see https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare.
https://miniflare.dev
MIT License
3.78k stars 205 forks source link

Recommended way to test in Miniflare 3? #624

Closed manuel closed 1 year ago

manuel commented 1 year ago

AFAIU, the testing approach outlined here doesn't work for MF 3: https://miniflare.dev/testing/jest

Is there something similar for MF 3, or is it recommended to just use MF 2 for testing?

Thanks!

mrbbot commented 1 year ago

Hey! 👋 Not yet, but we're actively working on it. I'd recommend sticking with Miniflare 2 for unit testing atm. 👍

Other alternatives include using unstable_dev() or Miniflare's API for integration testing.

beanow-at-crabnebula commented 1 year ago

Hi @manuel since you closed the issue have there been any developments on the testing front? At the moment we went with the unstable_dev integration tests, pending a recommended environment.