These are chat archives for canjs/canjs

14th
Sep 2018
Andrei Balmus
@abalmush
Sep 14 2018 14:53
Hi guys, does anyone has experience with intergating Jest in canjs app?
Gregg Roemhildt
@roemhildtg
Sep 14 2018 14:53
I've done this @abalmush
Jest works super well testing view models
Andrei Balmus
@abalmush
Sep 14 2018 14:55
@roemhildtg do you have an example especially how to configure it
I have quite old project with canjs 2.3 )
Gregg Roemhildt
@roemhildtg
Sep 14 2018 14:57
Weeeeelll, I haven't really needed to configure anything with Jest. That being said I'm writing stuff in es6 now so everything just works.
I'm also using canjs 5
Andrei Balmus
@abalmush
Sep 14 2018 14:57
and I tried to get it to work, looks like the instance of canjs inside Component is differetn and I see warning somethig saying that this component is not registered
yeah with Canjs5 should work pretty well
Gregg Roemhildt
@roemhildtg
Sep 14 2018 14:58
Ah, so you're trying to test the components? I haven't done that yet. Just viewModel testing so far. Like logic and whatnot. Functional testing is a whole new level for me
Andrei Balmus
@abalmush
Sep 14 2018 14:59
yeah yea exatly I’m trying to render it using stache and check if everything is rendered. Same way as with React component )
Gregg Roemhildt
@roemhildtg
Sep 14 2018 15:01
Yeah. Its on my todo list to look into that.
Andrei Balmus
@abalmush
Sep 14 2018 15:01
Please let me know if you figure it out, I’ll post a message here as well
Gregg Roemhildt
@roemhildtg
Sep 14 2018 15:02
:thumbsup: