Open-Assistant
Open-Assistant copied to clipboard
Write tests for JavaScript OasstApiClient
trafficstars
Note: Waiting for https://github.com/LAION-AI/Open-Assistant/pull/342 to be merged.
There are three tests that were not written for the OasstApiClient.
The TODOs for the tests can be found here and theOasstApiClient can be found here.
We want tests which ensure that:
- A 204 response from the API does return a
null - A non-2XX response with a valid
OasstErrorresponse should throw anOasstErrorwith data from the response - A non-2XX response with an unknown format (not
OasstError) should throw a genericOasstErrorwith the text from the response.
Similar tests were written for the Python OasstApiClient found here.