Closed nam-m closed 11 months ago
@nam-m , Great Job!
I really like the quality of UT here.
Your test are failing test btw.
Resolved process.env issue in last commit Will try to not use axios-mock-adapter package and reopen this PR after
Thank you @nam-m , this is so close.
Thanks @SamHuo213 @umsu2 a lot for your feedback!
I made changes based on your comments, and this is ready for review again.
Also added a test to check undefined process.env.GITHUB_API_KEY
in getAxiosInstance()
Added tests for
Pre-requisites:
mock-axios-adapter
package is installed to mock axiossrc/.env.test.local
, I changed this token retrieval method ingithub.client-service.ts
to useprocess.env
instead ofnextConfig
. Reference: https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables