You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The working script would feel sturdier with tests, there's a lot happening in the script that we aren't verifying. I also found it a little hard to guarantee changes would work as expected without any test coverage.
Cloudflare has integration with Vite, which is slightly different than web-test-runner but the test cases do use similar syntax (Jest). We'd want to mock proxied request responses, here is an example to work from:
I just ended up dropping this in, I needed it to verify my changes and even to understand how this library works. Cloudflare adds another layer of confusion too, as some of their implementation is slightly different than Node/browser native Request/Response/etc.
The working script would feel sturdier with tests, there's a lot happening in the script that we aren't verifying. I also found it a little hard to guarantee changes would work as expected without any test coverage.
Cloudflare has integration with Vite, which is slightly different than web-test-runner but the test cases do use similar syntax (Jest). We'd want to mock proxied request responses, here is an example to work from:
https://github.com/cloudflare/workers-sdk/blob/main/fixtures/vitest-pool-workers-examples/request-mocking/test/declarative.test.ts
The text was updated successfully, but these errors were encountered: