WIP: feat: add tests for finding the api url #1019
Open
konrad
wants to merge 1 commits from feature/test-api-finder
into main
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'feature/test-api-finder'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Follow-Up for
26213d5e8c
Since the api-finding stuff recently broke, I figured we should have tests for it. I'm not quite sure yet how to properly test this, my best idea is to pass a function that resolves or reject depending on the current url. Open for ideas.
I'm not experienced in this, regardless I stumbled recently across testing api end points via service workers that replicate the api 1:1.
E.g. via https://mswjs.io/ (probably there are other solutions, was basically the first hit)
EDIT: also found this: https://github.com/Netflix/pollyjs