Fork me on GitHub
#clojurescript
<
2019-04-05
>
aspra11:04:36

Looking for a lib to use for headless interaction testing for a ring html app. In the past I used https://github.com/xeqi/kerodon but has been a while ago. Any suggestions please?

borkdude11:04:31

@aspra I highly recommend using etaoin together with some headless browser.

borkdude11:04:23

If you want an example:

aspra11:04:35

@borkdude may I ask if you have also tried hickory and what do you think of it?

borkdude11:04:18

I haven’t. I don’t really need it, Jsoup’s good enough for my use cases.

aspra11:04:44

ok thanks

borkdude11:04:10

maybe I could use it, but then I would have to learn it. usually I run into issues with wrappers and have to use the wrapped thing anyway

aspra11:04:38

I understand your approach. Simplest solution is usually better

aspra11:04:09

Thanks @borkdude, heard of it but never used it before

borkdude11:04:57

Oh wait, you have no JS? then you could also use tools like Jsoup I guess

borkdude11:04:20

I actually use both in the example I posted

4
exit216:04:10

Has anyone seen this error before? No protocol method ICounted.-count defined for type number

thheller16:04:47

cljs.user=> (count 1) yes

😅 4
exit216:04:32

ah okay, let me see why that might be happening then

Frank Henard20:04:05

I've used async/await in javascript, and was thinking about how the concept correlates to Clojure concurrency. I thought the idea maps well to how Clojure does futures. Promises are similar to futures anyway, right? Is it possible, or is anyone working on the ability to use futures in Clojurescript the way they are used in Clojure? eg.

(def my-future (future (/ 1 0))) ;; runs async
@my-future ;; waits till completion

mfikes20:04:32

@ballpark It's interesting to think about the threads of execution involved...

lilactown21:04:33

the problem is that you would have to rewrite the entire scope that @my-future is used within to be inside of my_future.then( ... ) in the resulting JS

lilactown21:04:00

JavaScript doesn't allow you to block and wait for a promise to resolve

lilactown21:04:19

this is similar to what core.async does with <! and go

lilactown21:04:38

I believe the promesa library has something similar with it's async macro

zane23:04:48

I have a function f that has metadata in namespace foo.a. Namespace foo.b requires foo.a and refers f. When I try to cljs.js/eval (f) with :ns 'foo.b I get

{:error #error {:message "ERROR", :data {:tag :cljs/analysis-error}, :cause #object[TypeError TypeError: foo.a.f is not a function]}}
and if I (type f) I get
cljs.core/MetaFn
What's going on here? I can't quite figure it out.

zane23:04:49

Even cljs.js/evaluating (let [z f] (z)) works.

zane23:04:23

Ah, it's because foo.a wasn't in the compiler state even though foo.b was.