Fork me on GitHub
#cljsrn
<
2016-08-12
>
vikeri06:08:50

@ilmirajat: I do my tests in node, but it was quite a task to set it up to work properly. I use react-native-mock, babel and mockery in a bootstrapping script. Not pretty but tests run superfast in node 🙂

artemyarulin06:08:10

@vikeri: btw - why node and not phantomjs or any other browser? I think in browser-like environment it should even easier - less things to mock

vikeri06:08:36

@artemyarulin: Node is easier to work with and faster in my opinion compared to phantomjs/slimer, what would you avoid mocking in a browser?

artemyarulin06:08:30

It was just a guess - in browser environment you can try to render things (react-native-web, etc.), in node I guess it’s different, I don’t know… btw - can you show example how did you do it?

vikeri06:08:12

@artemyarulin: Trying to get my docker image to work, will put something together when things work again

ilmirajat07:08:13

I also decided to use Node instead of phantomjs because I wanted to ensure that npm dependencies don't use things (e.g.window object) that React Native doesn't have.

ilmirajat07:08:04

In addition the reference (pepperoni-app-kit) I used, run tests on node.

ilmirajat07:08:26

I'm not familiar with slimmer.

artemyarulin07:08:41

hm, makes sense and I guess node is more stable and faster comparing to phantom/slimmer

pesterhazy08:08:46

also feel free to edit the wiki page, it should be writable by everyone