dart, unit testing private methods

前端 未结 1 1282
小蘑菇
小蘑菇 2021-01-12 06:08

I have a library which is quite large but only exposes a very tiny API to make it easy to use and learn for new users. I would like to keep my library this way, but I also w

相关标签:
1条回答
  • 2021-01-12 06:33

    If you move your private classes into a separate library in the same application then you can make them public and test them. You would then import that library in your current library and not export it (so the user of your library still can't use your other classes as long as he doesn't import that other library himself).

    0 讨论(0)
提交回复
热议问题