add simple repro test for async setInterruptHandler #90
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.
Repro test for #84
Added a basic test of executing sync code and can verify that the interrupt is called once in that case, but as soon as async code is run, we don't even get the first call to the interrupt handler.
I added a couple of global functions which we use in our project in case those are the source of the issue. They work pretty well aside from apparently disabling interrupt logic 😅
The first is "$delay" which is just a promise-ified timeout for easy async testing. The second is a "done" method, which wraps a new VM Promise and allows us to await deferred.settled outside the VM before trying to read the results