Search the Community
Showing results for tags 'monkeypatch'.
We're currently using TweenMax and TimelineMax extensively in our app, and we're also running a suite of unit tests against the interface via mocha and we've discovered that one of the major factors pushing our automated test times up is that GSAP appears to still be doing a lot of work, even when we monkeyPatch the tween/timeline durations down to 0. I haven't cracked open the GSAP lib to explore the inner workings yet, but my first thought was to just patch to(), from(), and fromTo() with nearly empty functions that will handle the callbacks. Although I still need to move the animated elements to their ending position, so maybe I could clone the .set() method and extend it to execute callbacks? But I have no idea if that's opening up a can of worms... So I was curious if this is something the GSAP team has already addressed in the past... maybe you guys already built out a solution or have some branch somewhere that handles all the potential animation types and all the various callbacks for both tweens and timelines, but has been optimized for an automated testing environment?