Testing workers created by @cloudflare/next-on-pages

Hi!

Workers have a really nice API (unstable_dev()) which allows me to start them locally and run e2e tests on the worker.
https://developers.cloudflare.com/workers/wrangler/api/

I was wondering if it's possible to create a Next.js application (using @cloudflare/next-on-pages) which internally generates a _worker.js file combined from all the backend functionalty and test that worker with the same API as I do for regular CF workers?

Has anyone done this?
Wrangler offers an experimental API to programmatically manage your Cloudflare Workers.
Was this page helpful?