unfetch icon indicating copy to clipboard operation
unfetch copied to clipboard

Run GitHub/fetch tests against this polyfill

Open mohsen1 opened this issue 8 years ago • 3 comments
trafficstars

I did try putting together a PR that runs all tests at github/fetch but got overwhelmed by amount of work required. Basically it should be done via Git submodules and a shell/node script that swaps the implementation in the submodule with dist of this project.

Doing most of things manually I saw a few tests failing.

mohsen1 avatar Feb 22 '17 07:02 mohsen1

Sound good. We will definitely need to selectively ignore some tests though.

developit avatar Feb 22 '17 11:02 developit

Which parts you think it should fail?

mohsen1 avatar Feb 22 '17 18:02 mohsen1

unfetch intentionally doesn't recreate the Headers or Response classes, instead using POJO's for them to shave bytes (so those tests should all fail). The rest are just size tradeoffs - I was on the fence about even supporting Response#xml() and Response#blob(), but the size bump was minimal (10b) for them. To me, unfetch is best kept as a bare minimum feature set: loosely emulating the fetch() API semantics but allowing the same userland usage so that it remains transparent for the 99% case. Anything that falls under the umbrella seems like fair game.

developit avatar Feb 22 '17 18:02 developit