Prevent Karma from timing out when an assertion fails on a VTU wrapper #696
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes, an assertion failure will cause Karma to time out and exit, which can add friction to testing. I thought it was maybe a bug with Should.js, but I think it's something more specific, that Should.js is doing something that Vue or Vue Test Utils doesn't like. These timeouts seem to happen when an assertion fails on a Vue Test Utils wrapper specifically (or an array of wrappers). I'm not quite sure why that is (maybe Should.js is traversing the wrapper, and the wrapper contains a recursive cycle?). And my solution here still needs more validation. But so far, it looks like this change prevents these timeouts.