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

Handle multiple async lifecycle functions in a suite #767

Closed
jason0x43 opened this issue Jul 11, 2017 · 0 comments
Closed

Handle multiple async lifecycle functions in a suite #767

jason0x43 opened this issue Jul 11, 2017 · 0 comments
Assignees
Labels
bug Something that's not working as intended
Milestone

Comments

@jason0x43
Copy link
Member

The hooks in the tdd and bdd interfaces use aspect.on to add lifecycle functions to suites, which is equivalent to aspect.after. If a hook is called multiple times in a suite, only the value from the last added hook will be returned and resolved by Intern.

describe('something', () => {
    beforeEach(() => {
        // return a promise
    });

    beforeEach(() => {
        // return a promise
    });
});

The interfaces should do something (like wrap the hook callback) to ensure that any promise returned by a previous call to the hook will be resolved before the current callback is called.

@jason0x43 jason0x43 added the bug Something that's not working as intended label Jul 11, 2017
@jason0x43 jason0x43 added this to the Intern 4.0 milestone Jul 11, 2017
@jason0x43 jason0x43 self-assigned this Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

1 participant