addons
addons copied to clipboard
Audit test suite for invalid tests due to async behaviour
As discussed on Slack, and also mentioned in https://github.com/mozilla/addons/issues/14615, there are likely a number of tests in our suite that could generate false positives if bugs arise in our code due to the fact that our tests now need to deal with async changes.
This class of test is generally a test where we are checking that things do not change. For example, the UI does not change, or an action is not dispatched. Because we often have to wait for updates to our components before being able to accurately assert about the current state, there are likely tests that are currently passing not because the code is executing properly, but merely because we are not waiting for changes to occur. It is unlikely that any of these are currently false positives, but if a bug was introduced into the code that would have caused the test to fail, the test would keep passing because we haven't added the necessary code to wait for the change.
In some cases this will be impossible to test for, but in many others there are things we could await
in order to make the tests valid.
Unfortunately, it doesn't seem like there is any way to uncover these other then looking through all of the tests one by one. This issue is about doing just that.
┆Issue is synchronized with this Jira Task
Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDFRNT-90