Samuel Colvin
Samuel Colvin
I think we should call this "seared duck" as it's duck typing serialisation.
@dmontagu might be worth looking at this while working on genetics.
https://github.com/worker-tools/parsed-html-rewriter should help for `HTMLRewriter`.
good point, I'm working on this in #14. Just strange errors with cloudflare types conflicting with global/node types to fix. Any suggestions welcome.
I would guess (without trying, but I will if this doesn't work), that something like this should work: ```ts import {makeEdgeEnv} from 'edge-mock' import mockFetch from 'jest-fetch-mock' describe('whatever', () =>...
If it helps, you might want to have a look at https://github.com/samuelcolvin/edgerender/tree/main/tests, in particular `handle.test.tx` as it uses `edge-mock`.
We could also change the behaviours of `makeEdgeEnv` so something like the following stopped it from installing `fetch` into `global`? ```ts import {makeEdgeEnv, SKIP_MOCK} from 'edge-mock' ... makeEdgeEnv({ fetch: SKIP_MOCK...
I'm assuming this is fixed, but feel free to ask more questions if not.
Maybe easiest just to remove the default mock of fetch. For individual cases it's pretty easy to mock it yourself.
`override_copy` should allow stuff like not always renaming files and copying some files to other locations, eg. `favicon.ico`