You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is one of the things hTest needs for parity with other testing frameworks, and can be quite useful for testing events etc.
One way to implement it would be a predefined run function that tests can import, but the count needs to be specific to the test.
Perhaps this can be done if the function maintains a weakmap of Test objects to counts? Or it can also use data to store the count?
But then how do you signal that the test is over? You want to fail when it's called both fewer times, and more times than you want, so using a promise that resolves when it's been called as many times as expect specified doesn't seem to fly.
Looks like we need a timeout for async tests (if we don't already have one), but that by itself is not enough.
The text was updated successfully, but these errors were encountered:
This is one of the things hTest needs for parity with other testing frameworks, and can be quite useful for testing events etc.
One way to implement it would be a predefined
run
function that tests can import, but the count needs to be specific to the test.Perhaps this can be done if the function maintains a weakmap of Test objects to counts? Or it can also use
data
to store the count?But then how do you signal that the test is over? You want to fail when it's called both fewer times, and more times than you want, so using a promise that resolves when it's been called as many times as
expect
specified doesn't seem to fly.Looks like we need a
timeout
for async tests (if we don't already have one), but that by itself is not enough.The text was updated successfully, but these errors were encountered: