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

Allow different patterns for the t.try() callback argument #273

Open
novemberborn opened this issue Sep 15, 2019 · 2 comments
Open

Allow different patterns for the t.try() callback argument #273

novemberborn opened this issue Sep 15, 2019 · 2 comments

Comments

@novemberborn
Copy link
Member

avajs/ava#1947 landed a new t.try() assertion. It's experimental, one of the reasons for which is that it advocates some new usages of AVA that this plugin rejects.

t.try() takes a callback, which receives another execution object:

const attempt = await t.try(t => {
  t.pass()
})

attempt.commit()

Not all linting setups allow you to shadow variables like this. I'm proposing we also allow tt, and t1 through t9. Thoughts?

@sindresorhus
Copy link
Member

I would also allow t_. I usually postfix with underscore for shadowed variables with the same name.

@novemberborn
Copy link
Member Author

Yes. Looks like you're agreed with the other patterns so then we need to add support for all of these.

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

No branches or pull requests

2 participants