Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 01:44

    greenkeeper[bot] on @webcomponents

    (compare)

  • 01:42

    greenkeeper[bot] on @webcomponents

    chore(package): update @webcomp… (compare)

  • Nov 12 05:28
    greenkeeper[bot] commented #5392
  • Nov 12 05:28

    greenkeeper[bot] on core-js-3.4.1

    chore(package): update core-js … (compare)

  • Nov 11 18:03
    greenkeeper[bot] labeled #5422
  • Nov 11 18:03
    greenkeeper[bot] opened #5422
  • Nov 11 18:03

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Nov 11 18:02
    greenkeeper[bot] commented #5401
  • Nov 11 18:02

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Nov 10 23:39

    greenkeeper[bot] on @octokit

    (compare)

  • Nov 10 23:37

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Nov 08 16:08
    greenkeeper[bot] labeled #5421
  • Nov 08 16:08
    greenkeeper[bot] opened #5421
  • Nov 08 16:08

    greenkeeper[bot] on can-stache-bindings-5.0.2

    fix(package): update can-stache… (compare)

  • Nov 07 17:31

    cherifGsoul on 6-2-5-version

    (compare)

  • Nov 07 17:31
    cherifGsoul closed #5420
  • Nov 07 17:30

    cherifGsoul on master

    Update dist for release (compare)

  • Nov 07 17:28
    cherifGsoul edited as member
  • Nov 07 17:27
    cherifGsoul added as member
  • Nov 07 17:17
    cherifGsoul opened #5420
Kevin Phillips
@phillipskevin
is that the top-level of the template?
Gregg Roemhildt
@roemhildtg
Yes
Kevin Phillips
@phillipskevin
if you wrap it in a <div> does the error go away?
might be related to canjs/can-stache#202
Gregg Roemhildt
@roemhildtg
Nope. Still happens
Kevin Phillips
@phillipskevin
what is oldElements[0]?
Gregg Roemhildt
@roemhildtg
image.png
A bit up the call stack
image.png
Kevin Phillips
@phillipskevin
what if you wrap Error occurs here when selectedProject gets set in an element?
Gregg Roemhildt
@roemhildtg
Nope
Kevin Phillips
@phillipskevin
ok, if you can reproduce it in a codepen I can take a look
later tonight / tomorrow morning
Gregg Roemhildt
@roemhildtg
Is there a canjs symbol for something like "can.forEach"?
Kevin Phillips
@phillipskevin
there is CanSymbol.iterator
Gregg Roemhildt
@roemhildtg
If I add that, it'll call that function in stache for of ?
Kevin Phillips
@phillipskevin
you're trying to create your own observable you mean?
Gregg Roemhildt
@roemhildtg
Correct. Its kind of like an array...it has a toArray method, and a length property but its not like a normal array where you can do array[0]. So I thought I'd build an iterator function
Kevin Phillips
@phillipskevin
you would need more symbols than that
definitely isObservableLike and isListLike
not sure what else
Andrei Balmus
@abalmush
Hi guys, does anyone has experience with intergating Jest in canjs app?
Gregg Roemhildt
@roemhildtg
I've done this @abalmush
Jest works super well testing view models
Andrei Balmus
@abalmush
@roemhildtg do you have an example especially how to configure it
I have quite old project with canjs 2.3 )
Gregg Roemhildt
@roemhildtg
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
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
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
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
Yeah. Its on my todo list to look into that.
Andrei Balmus
@abalmush
Please let me know if you figure it out, I’ll post a message here as well
Gregg Roemhildt
@roemhildtg
:thumbsup:
Guido Smeets
@gsmeets
I am using mocha, but the principles are the same I reckon
I've made a few helper functions to easily render a component. The only tricky part is when you have fixtures for your data, which are collected async. So you need to add some promise to your viewmodels to ensure that they're loaded. I've done that generically for all my "functional" components.
Kevin Phillips
@phillipskevin
@abalmush can you post the error you're seeing?
Andrei Balmus
@abalmush
Hi @phillipskevin ok sure I will post it later, today.
Kevin Phillips
@phillipskevin
:thumbsup:
Andrei Balmus
@abalmush
I configured it from scratch, and I’m gettin another error:
Screen Shot 2018-09-15 at 11.09.21 PM.png
and this is the component it self
Screen Shot 2018-09-15 at 11.11.34 PM.png
that looks like something different, before it was that Jest didn’t see component initialization
I will try to reproduce later
Marc Godard
@MarcGodard
I have seen a way to do this, but cannot remember. I have a viewmodel variable that defaults to null, then gets set (this is a session type variable). Then in another viewmodel, once that is set, I want to update a variable, using get (). Just can't figure out how to do that anymore.
Any one know?
Andrei Balmus
@abalmush
@MarcGodard you can find a model of the component using can.viewModel - https://canjs.com/doc/can-view-model.html
Kevin Phillips
@phillipskevin
@abalmush are you using steal somewhere in your code?