react-native-firestack icon indicating copy to clipboard operation
react-native-firestack copied to clipboard

[v3] Missing tests

Open moooji opened this issue 7 years ago • 3 comments

Bugs like for example https://github.com/fullstackreact/react-native-firestack/issues/236 would be easier to find early on with unit tests. Currently, there is not a single test in v3.

What do you think, should Mocha or Jest be used as testing framework?

moooji avatar Jan 12 '17 01:01 moooji

I'd say jest, as it works better with RN. Problem is getting everything working in tests ;p

We do have the firestack app demo for testing, that's using v3 now, might be worth putting tests on that instead, as it's already an app, can test things like database etc then

Salakar avatar Jan 12 '17 07:01 Salakar

@Salakar @moooji yes, I spent time trying to get the tests going (there's a testing branch), but I was ultimately unsuccessful as I could not find a way to stub the NativeModules. If you/someone can find a good way to stub them, then we should be writing tests. Until then... I'm not sure how we can write unit tests...

Feature/Integration tests? FirestackApp was originally intended on being the integration tests app.

auser avatar Jan 14 '17 02:01 auser

Any updates on this work? When I get back to FS next week, I can help out with more testing.

auser avatar Feb 01 '17 19:02 auser