Closed AStoker closed 6 years ago
@AStoker Sorry, I'm not sure I fully understand - what is the scenario where you want to make sure a function was called with a pre-created element?
Well, I was looking at the virtual-repeat.spec.js
file, where an element
is created. This element is then registered on the container as a DOM.Element
so that when the virtual repeat binding is executed, it uses element
. Then, later on in the tests we want to make sure that functions such as getStrategy
are called with the proper element (the element
).
This might be a non issue, but I was thinking about possible future use cases as well where I wanted to specifically have an instance of the element to put spies on and use that element as the view in a test.
Is this still relevant?
@AStoker Thoughts?
Oh gee, this is so far back. I'm going to go ahead and close this, as it's not a problem, and if it's been this long between initial request (and no other "me too's") then I think we'll be fine. If I come back up on this later, I'll reopen.
I'm working on trying to get tests back up and running on the UI-Virtualization plugin, and realized that at some point, we're trying to make sure a specific function was called with a pre-created element.
What the ComponentTester allows in the
inView
function is only a string. If we were able to pass an element in as well, then we could set up proper listeners in our tests.