Fork me on GitHub
#cljsrn
<
2016-04-07
>
artemyarulin07:04:58

@jessica: Yeah, I mean that. Just remembered https://github.com/artemyarulin/koh/blob/master/circle.yml. This may be a bit outdated, but may be a starting point how to organise testing. This project has CI integration with CircleCI and runs tests using Node, Phantom and iOS

artemyarulin08:04:17

I guess somebody tried DataScript and then gave up because of performance problems. Can any body tell more about that or DS experience in general?

jessica14:04:21

@artemyarulin: Thanks for the link! I’m trying to replicate my situation with your repo. A couple questions / observations. 1. When trying to require(“react-native”) from core.cljs, I get the error: Error: Cannot find module 'react-native’. It’s a bit strange though because the node_modules is in kohRN dir, and the src dir is pretty isolated. Any thoughts there? 2. When I add the cljs-ajax dependency and require ajax.core in your project, I hit the same error that I get:

ajax/xml_http_request.cljs:11
(extend-type js/XMLHttpRequest
^
ReferenceError: XMLHttpRequest is not defined
at Object.<anonymous> (<my-dev-directory>/koh/target/tests/ajax/xml_http_request.js:8:1)
3. Seems like other people are having my same issue with requiring react-native (causes SyntaxError: Unexpected token). Seems like this was added after react-native 0.16.0. (See here for commit: https://github.com/facebook/react-native/commit/f9b744d50137de25357994fe2e829f98104e2242#commitcomment-15405413) There's so many hurdles to jump through just to get unit tests working. Is everyone hitting the same issue / has anyone found a good way to unit test? Is there a better approach to testing that I should be aware of? I don’t believe it’s a doo specific issue, but rather a cljs.test issue, since doo basically just calls cljs.test/run-tests.

adamfrey18:04:38

Before now I’ve only used boot-react-native, but I’m trying out re-natal. Running my app on Genymotion for Android, I just see “Waiting for Figwheel to load files” forever. The figwheel repl is connected and I can eval expressions, but nothing prints to the screen even if I click “Reload JS” from the dev menu. Any thoughts?

artemyarulin18:04:05

not sure about re-natal but there might be multiple places which you have to change

artemyarulin18:04:05

@jessica: Yep, like I said it may be outdated a bit simple_smile Check this issue and a solution https://github.com/drapanjanas/re-natal/issues/32#issuecomment-202098482

artemyarulin18:04:30

you may try to upgrade re-natal to resolve it

artemyarulin18:04:03

2 and 3 related to 1 - if no RN get loaded, then no XmlHTTPRequest wrappers availalbe

adamfrey18:04:11

It’s rendering now. It looks like I had a cljs runtime error, and I was seeing nothing?

adamfrey18:04:13

There was no red screen or compilation warning, but then I removed some lines of cljs and it renders fine

artemyarulin18:04:33

could be - usual way to solve it is lein clean && lein cljsbuild once to make sure there are no syntax errors or whatever

artemyarulin18:04:02

I guess it kinda hangs if you have syntax error and nothing can be compiled - it just waits forever

adamfrey18:04:02

lein clean is my least favorite thing about leiningen. I use boot 99% of the time and I’m amazed that people put up with weird errors related to uncleaned assets

adamfrey18:04:43

thanks for your help, regardless

artemyarulin18:04:34

I was trying to say that if nothing works - try to check that it actually could be compiled simple_smile I guess @misha was reporting to #C050HE28Y channel quite the same issue with the same solution