Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Write tests for JavaScript OasstApiClient

Open jack-michaud opened this issue 2 years ago • 0 comments
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:

  1. A 204 response from the API does return a null
  2. A non-2XX response with a valid OasstError response should throw an OasstError with data from the response
  3. A non-2XX response with an unknown format (not OasstError) should throw a generic OasstError with the text from the response.

Similar tests were written for the Python OasstApiClient found here.

jack-michaud avatar Jan 04 '23 02:01 jack-michaud