Skip to content

Add after.always afterEach.always runners to index.d.ts #873

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

Merged
merged 1 commit into from
May 27, 2016

Conversation

rhysd
Copy link
Contributor

@rhysd rhysd commented May 25, 2016

after.always and afterEach.always runners were added to ava in 0.15. I added them to index.d.ts. I already confirmed that below code can be compiled with new index.d.ts.

import test from 'ava';

test.afterEach(t => {
    console.log('BEFORE');
});

test.afterEach.always(t => {
    console.log('BEFORE ALWAYS');
});

test.after(t => {
    console.log('AFTER');
});

test.after.always(t => {
    console.log('AFTER ALWAYS');
});

@rhysd rhysd force-pushed the typescript-after-always branch from 03afd82 to 17d395d Compare May 25, 2016 11:05
@sindresorhus
Copy link
Member

@SamVerschueren @ivogabe :shipit:?

@SamVerschueren
Copy link
Contributor

LGTM, except if test.always.after should work as well, that will not work. But I have to take a look if swapping keywords can be solved elegantly so I'm ok with a merge and I will solve it in a separate PR together with the others.

@ivogabe
Copy link
Contributor

ivogabe commented May 25, 2016

👍, adding test.always.after should not be to hard but that can be done later too.

@jamestalmage
Copy link
Contributor

Chain ordering will never matter. It usesoption-chain under the hood.

@SamVerschueren
Copy link
Contributor

Good to know :)

@rhysd
Copy link
Contributor Author

rhysd commented May 27, 2016

I think this PR can be merged, right?

@jamestalmage jamestalmage merged commit 2e98438 into avajs:master May 27, 2016
@jamestalmage
Copy link
Contributor

Thanks @rhysd.

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.

5 participants