Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Verify buggy dispatch tests #312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[DO NOT MERGE] Verify buggy dispatch tests #312

wants to merge 1 commit into from

Conversation

jdantonio
Copy link

DO NOT MERGE

I believe I have found two buggy dispatcher tests. These tests create method stubs that are never called. When a different method is called on the test double an error is raised. However, the unstubbed method call happens inside a Promise and so the error is suppressed. Instead of the test failing the promise's fail block runs. I discovered this while working on a spike of this potential dispatcher update.

This PR does not change the tests. Since I am new to both Volt and Opal I wanted to get verification from someone more knowledgeable. If what I believe is happening is correct I will be happy to update the PR.

@ryanstout
Copy link
Member

good catch on this. Since our code runs on both the server and client, we use promises for blocking method calls. (Unfortunately missed errors like this are one of the limitations of working with promises) I've got a few ideas to improve this situation, but haven't gotten around to implementing them yet. Let me refactor the test a bit so it will raise on these kind of issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants