testing icon indicating copy to clipboard operation
testing copied to clipboard

feat(update): update bindings helper

Open zewa666 opened this issue 7 years ago • 8 comments
trafficstars

adds a helper function to flush the microtaskqueue so that testing binding changes becomes easier

zewa666 avatar Jan 14 '18 12:01 zewa666

Hey @bigopon I could need some help with getting the tests to work. Funny enough using the updateBindings helper in an app works flawlessly but not inside the testing repos tests themselves.

zewa666 avatar Jan 14 '18 12:01 zewa666

I can reproduce it. I'll check and update

bigopon avatar Jan 14 '18 13:01 bigopon

The task queue that component view model observers uses is not the same task queue getting from global Container. I'm not sure why. Without proper debugger I think it's hard to observe the behavior. Maybe @jdanyow / @EisenbergEffect can give some help

bigopon avatar Jan 14 '18 19:01 bigopon

I had the same Idea but even picking the aurelia.container during bootstrapping, which should be the right one, didnt help. I wonder whether its because of the way how the initialization is setup, pointing to the dist folder. I'll try to switch that similar to how I did it with i18n and see whether this helps.

zewa666 avatar Jan 14 '18 20:01 zewa666

@zewa666 Did you have any luck with this or have any other information that will help in getting this PR over the line?

I'd like to remove my setTimeout() hack for testing two-way binding :)

silbinarywolf avatar Sep 20 '18 07:09 silbinarywolf

@bigopon @zewa666 should we merge this?

Alexander-Taran avatar Feb 10 '19 01:02 Alexander-Taran

Let me fix it first. I'll create a PR shortly

bigopon avatar Feb 10 '19 01:02 bigopon

I think we will have to delay this feature for awhile, unless we fix some issues related to resources registration with container first. setTimeout(, 0) or await Promise.resolve() could be appropriate for now.

bigopon avatar Feb 10 '19 02:02 bigopon