Skip to content

Add t.timeout() #2015

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 4 commits into from
Jan 26, 2019
Merged

Add t.timeout() #2015

merged 4 commits into from
Jan 26, 2019

Conversation

dflupu
Copy link
Contributor

@dflupu dflupu commented Jan 13, 2019

Fixes #1565

As suggested in the issue, the timeout is refreshed whenever an assertion is made.
I'm not sure if the typescript or flow definitions need to be updated.

Copy link
Member

@novemberborn novemberborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, you're on a roll!

I'm not sure if the typescript or flow definitions need to be updated.

Yes that'd be great. See

ava/index.d.ts

Line 350 in 7262a78

plan: PlanFn;
and
plan: PlanFn;
.

@dflupu
Copy link
Contributor Author

dflupu commented Jan 13, 2019

Hi @novemberborn, thanks a lot for the quick feedback! I've tried to address everything you've mentioned. Please look over the updated changes when you find the time.

@sindresorhus sindresorhus changed the title add t.timeout() Add t.timeout() Jan 14, 2019
@novemberborn
Copy link
Member

This is great, thanks @dflupu. I've pushed two more tweaks, let me know what you think.

@dflupu
Copy link
Contributor Author

dflupu commented Jan 20, 2019

I'm rather curious why you'd go through the trouble of checking for Timer#refresh. Not that I have anything against it.

@novemberborn
Copy link
Member

I'm rather curious why you'd go through the trouble of checking for Timer#refresh. Not that I have anything against it.

It's the modern API and should be more efficient than recreating the timer, closure, etc.

@novemberborn novemberborn merged commit b65c6d7 into avajs:master Jan 26, 2019
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.

3 participants