di-sukharev / opencommit

Generate conventional git commit messages with AI in 1 second 🤯🔫
https://www.npmjs.com/package/opencommit
MIT License
5.98k stars 318 forks source link

[Bug]: we need to cover `oco config set ...` with tests #390

Closed di-sukharev closed 4 weeks ago

di-sukharev commented 1 month ago

Opencommit Version

latest

Node Version

20

NPM Version

latest

What OS are you seeing the problem on?

No response

What happened?

I've released 3.0.18, which was broken — oco config set OCO_MODEL didnt work correctly to a wrong code, fixed in https://github.com/di-sukharev/opencommit/pull/387

Expected Behavior

We should also test oco config set OCO_MODEL and OCO_OPENAI_API_KEY

Current Behavior

Now only oco command to generate a commit message is tested.

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

di-sukharev commented 1 month ago

there is test/unit/config.test.ts, but it only covers getConfig, we should cover setConfig

di-sukharev commented 1 month ago

i will be adding tests here https://github.com/di-sukharev/opencommit/pull/391

di-sukharev commented 1 month ago

i've merged the #391, will be adding tests as a separate PR referring to this issue. i should have time this weekend

di-sukharev commented 4 weeks ago

done