-
Notifications
You must be signed in to change notification settings - Fork 238
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
[expect-expect] support chained function names #471
Comments
Turns out adding |
Yeah I was pretty sure I'd already implemented that for this exact reason 😄 While I understand why globbing sounds useful, I feel like it could be an easy footgun since it could result in non-assertion method being counted by mistake. Plus as soon as you have "globbing" people generally expect it to work in a similar way to how it does everywhere else, so we'd have to add a new dependency for something like micromatch or globby. None of these are a hard no, but I'll have it on the backburner for now, and have a think. |
@erunion, I just stopped by to create an feature request for this exact issue (supertest's @G-Rath, I tend to agree with your concerns about globbing, but would it be possible to (optionally) detect usages of a method by name, rather than only standalone functions? |
Instead of globbing, I've been playing around with a PR that'd support regex matching instead, but haven't made much progress so far due to my lack of ESLint parsing internals. |
This issue can be closed since 295ca9a implements this |
[see #418 for previous discussion]
Currently expect/expect doesn't recognize supertest or sinon assertions. For example:
Adding sinon (or calledOnce) into the
assertFunctionNames
configuration block doesn't get recognized, so it would be cool to:assertFunctionNames
likesinon.assert.calledOnce
.sinon.assert.*
or for supertest cases,request.*.expect
.The text was updated successfully, but these errors were encountered: