Apr 30, 2021
The answer is the same for every PL: you don't. Privates shuold be covered (hence via code coverage tools) indirectly through public APIs. This is not a JS thing, it's a universal concept of privates that cannot be accessed directly, otherwise these wouldn't be private. Not exposed closures and utilities are the same: write tests that cover all your code, don't access directly stuff you should never access directly out there.