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

start()/QUnit.start()/async resolution should be moved to end of statement block #16

Open
platinumazure opened this issue Jun 9, 2015 · 0 comments
Labels

Comments

@platinumazure
Copy link
Owner

QUnit's new assert.async() framework adds a breaking change in that resolving the async point (i.e., calling the callback returned by assert.async()) must be done after all assertions.

It is impossible in general to determine what the "last execution point" of a function should be, given the many potential callback scenarios that could arise. However, we could assume that the developers know what they are doing in terms of which block an async resolution call should go in, even if they may choose to resolve the async call at the beginning or in the middle of the block. Therefore we could move the async resolution call to the end of the block in which it appears, and that would take care of the vast majority of these problems.

Anything not solved by this approach is probably intractable or pathological and therefore not something qunit2-migrator should even bother dealing with. :-)

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

No branches or pull requests

1 participant