12joan / twitter-client

A temporary Twitter client for fetching recent tweets for use while Twitter is closed to guest users
The Unlicense
26 stars 5 forks source link

Add tests #23

Open 12joan opened 1 year ago

12joan commented 1 year ago

Tests should be added for any function containing logic that might become broken in the future. For example:

To test functions that contain hardcoded fetch calls, add a stubFetch?: () => Promise<TWhatever> option that overrides the fetch.

It would also be a good idea to add integration tests that call /:username and /:username/rss directly. Since the access tokens are hardcoded, there's no need to stub the Twitter API; we can use live data.