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

"Expected error to be handled." perhaps should account for arguments #466

Closed
will123195 opened this issue Mar 24, 2016 · 1 comment

Comments

@will123195
Copy link

commented Mar 24, 2016

This code fails with Expected error to be handled.

test('should get something', function (t) {
  request.get({
    uri: 'http://localhost:3000'
  }, function (err, res, body) {
    handleError(arguments)
    t.equal(res.statusCode, 200)
    t.end()
  })
})

Although, technically the error is being handled.

@feross

This comment has been minimized.

Copy link
Member

commented Mar 24, 2016

This is a limitation of the handle-callback-err rule and definitely an edge case. Feel free to open an issue on the eslint repo.

It's easily worked around though:

handleError(err, res, body)

@feross feross closed this Mar 24, 2016

@feross feross added the question label Mar 24, 2016

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.