-
Notifications
You must be signed in to change notification settings - Fork 32
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
no-standalone-expect
: False positive when there are multiple describe
blocks
#291
Comments
Interesting, sounds like an issue with the aliases not applying in all instances for some reason. |
@michaelfaith I was unable to reproduce this. Could you create a reproduction code sandbox? |
Closing due to lack of reproduction steps |
@mskelton Sorry for not responding sooner. I can upload a reproduction, but a really simple recreation that might help shows how simply aliasing the This isn't exactly the same as our issue; I still need to dig into our set up to see what we're doing in terms of aliasing, but this is a simple recreation. |
It's also worth noting that it broke the |
@michaelfaith I'm guessing you didn't configure global aliases in your config. https://github.com/playwright-community/eslint-plugin-playwright#aliased-playwright-globals |
I did not. Is that necessary even for local import aliases, like this? I confirmed that if I add the following, it works as expected. settings: {
playwright: {
globalAliases: {
test: ['it'],
},
},
}, |
@michaelfaith Yes, it's necessary even with import aliases. The primary reason for this is that imports often can come from files which define fixtures, so the import source isn't always just |
If using nested
describe
blocks to organize multiple sets of tests, theexpect
calls within theit
tests in thedescribe
blocks after the first, are causingno-standalone-expect
to flag them incorrectly.Note: if the test function is
test
instead ofit
, then it also doesn't flag. It only seems to impact tests that useit
The text was updated successfully, but these errors were encountered: