load1n9 / openai

Unofficial Deno wrapper for the Open Ai api
MIT License
73 stars 23 forks source link

Add tests #35

Open alexewerlof opened 1 year ago

alexewerlof commented 1 year ago

Deno has native testing support. Could we add some tests with mock data just to ensure that the parsing and encoding/decoding functionality works as expected?

lino-levan commented 1 year ago

Tests would definitely be nice, especially around my SSE decoding.

load1n9 commented 1 year ago

Yeah sounds good, a big thing for testing is testing is costly so keeping it to a minimum while testing everything would be nice

alexewerlof commented 1 year ago

To reduce duplication of effort, and diverging from whatever convention and preference you may have in mind, I'd prefer if you guys add the basic tests and I'll add to it with the PRs that I'll be making. 🙏