Please update public API return types to not come from internal packages, as it make it impossible to mock. It's also kind of bad practice to be returning private data type on a public API as it makes it harder for people to work with and test etc.
for example type vonage.ApplicationResponse is exposed on the public API but contains subtypes application.ApplicationResponseKeys which is internal to the module. Therefore when I try to create my own type in my tests like so, I will get a compilation error.
I'm having the same issue when trying to create tests for my SMS APIs that are testing the return values of my mock client. Propose moving all types into a models directory to better match convention?
Please update public API return types to not come from internal packages, as it make it impossible to mock. It's also kind of bad practice to be returning private data type on a public API as it makes it harder for people to work with and test etc.
for example type
vonage.ApplicationResponse
is exposed on the public API but contains subtypesapplication.ApplicationResponseKeys
which is internal to the module. Therefore when I try to create my own type in my tests like so, I will get a compilation error.the vonage package it self should also define it's own type
ApplicationResponseKeys