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

ava/test-ended error on function defined outside #1687

Closed
niftylettuce opened this issue Feb 5, 2018 · 1 comment
Closed

ava/test-ended error on function defined outside #1687

niftylettuce opened this issue Feb 5, 2018 · 1 comment

Comments

@niftylettuce
Copy link
Contributor

I receive the following lint error if I define a function someFunction(t) { ... } that calls t.end inside of it and use test.cb.beforeEach(someFunction) or test.cb.afterEach(someFunction) such as:

const someFunction = t => {
  t.end();
};

test.cb.beforeEach(someFunction); // <--- lint error here
Callback test was not ended. Make sure to explicitly end the test with `t.end()`. (ava/test-ended)
@novemberborn
Copy link
Member

This is better discussed in eslint-plugin-ava. Looks like you ran into this before @niftylettuce 😉 avajs/eslint-plugin-ava#180 (comment)

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

No branches or pull requests

2 participants