ladjs/frisbee

http methods not available in jest tests

bastipnt opened this issue · 1 comments

Hi, I'm trying to test my application with jest and noticed, that I don't have the http methods on my Frisbee instance.
Scenario:

import Frisbee from 'frisbee';
// ...
const api = new Frisbee('http://example.com');
api.get // undefined

Result: api.get is undefined

When I link frisbee locally with yarn link and import the src:

import Frisbee from 'frisbee/src';
// ...
const api = new Frisbee('http://example.com');
api.get // function(...) {...}

Result: api.get is defined

Could not find out why. The code in frisbee/dist/index.js seems to implement these methods 🤷‍♂️

Thanks for ur help 🙏

Ok got it, my test setup is screw up ^^