cequence-io / openai-scala-client

Scala client for OpenAI API
MIT License
192 stars 21 forks source link

Missing unit tests #24

Open phelps-sg opened 1 year ago

phelps-sg commented 1 year ago

The CI pipeline was configured with a coverage threhsold of 75%, but currently the coverage is less than 5%, so have disabled the coverage threshold check in #33 until more unit tests are available.

phelps-sg commented 1 year ago

@peterbanda Just noticed recent commit removing mockito. It looks like there is no mocking framework that supports Scala 3, so the unit tests will have to be rewritten with hand-implemented mock classes: https://stackoverflow.com/questions/73082318/how-do-i-mock-classes-with-scala-3-2-scalatest-3-2-and-java-18

peterbanda commented 11 months ago

Hey @phelps-sg , I've completely overlooked your comments. My apologies. I replaced the Mockito library with "org.scalatestplus" %% "mockito-4-11" % "3.2.16.0", exactly because of the Scala 3 support. I'm not sure if it works for you. Anyway, the upcoming release will be massive with some breaking changes, so I assume some refactoring will be needed for the tests as well (besides the Mockito adjustments). Let me know what you think.