How I should I unit test jwts

I’m currently unit testing my project, but I’m stumped about how I should unit test JWTs from the jwt-go pkg. Should I just use one test-case that checks for any errors or handle each error as its own test-case?

Should I just use one test-case that checks for any errors or handle each error as its own test-case?

Both ways are correct. It comes down to one question: how much work are you willing to do?

Single test case for any error is simple and less painful. Handling each error as its own test-case gives you overall better coverage but introduces more complexity and can be overkill for simple project.