meteorify icon indicating copy to clipboard operation
meteorify copied to clipboard

Introduce support for unit testing

Open ShivamArora opened this issue 5 years ago • 4 comments

As of now, unit testing is not possible because Mockito doesn't support testing of static methods.

Support for unit-testing should be introduced by removing static methods from the code, so that unit testing is possible using Mockito.

ShivamArora avatar Oct 01 '19 06:10 ShivamArora

I think di might assist here. I'll do a couple of experiments

sduduzog avatar Oct 12 '19 19:10 sduduzog

@sduduzog Thanks. If you've any updates on this, just let me know whenever it's suitable for you.

ShivamArora avatar Oct 14 '19 08:10 ShivamArora

For now it's still research. I'm trying to see if I can find solutions that do not impose breaking changes to how the library is used. Also something that will be compatible with web+flutter too. I thought how would it be that exposed objects act as proxies, remain with static methods but have proxied ones injected. Thus allowing room to even tests the respective proxies tested with mocked objects? @ShivamArora

sduduzog avatar Oct 14 '19 09:10 sduduzog

@sduduzog If you can achieve that, it would help us a lot as we don't have to introduce any breaking changes.

ShivamArora avatar Oct 15 '19 05:10 ShivamArora