Skip to content

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