@pooya87
Thanks for your insightful answer! It was very helpful in understanding what I needed to know. Highly appreciated!
And sorry, I opened a bunch of tabs & then life happened, so took me a while to get back to you

You are right, my unit tests should only test my code and not anything else.
My attempt to retest BIP32 & BIP39 would fall under integration testing, because I am testing the rightness of my package interacting with another tested package.
So disregarding semantic for unit testing here. Please bear with me on that but I am open to hear any comments you may have.
About your point on pulling out the selected code piece in a function of its own, that's very welcoming advice, as I need to get better at that front. So I have managed to refactor it & define unit tests on how I am arriving at derivation indexes based on path string. Please see here:
https://github.com/ashfame/btcwallet/commit/f057f383a3bbc136dc48dac5ad2e239be9115a95I will be adding more unit tests but with functions involving cryptographic operations like deriving addresses, what do I use as my source of truth? This is something I am still struggling with.