Closed benkimpel closed 5 years ago
👍
One left!!
@dangreenisrael I wanted to check with you on a small inconsistency I noticed.
We have...
test/lib/rules/padding-around-expect-groups.spec.js
docs/rules/padding-around-expect-statements.md
and in the README.md padding-around-expect-statements
I think you had wanted to go with expect-groups
, but lmk.
yes, it did. Nice catch @benkimpel. Thanks!!!
it should be expect-groups
I'm also open to other suggestions.
No preference here! I'll change it to groups in a PR tomorrow and I have a PR almost ready for the last bit of this (around test/it).
@dangreenisrael I'm going to close this and leave discussion for the padding-around-all
rule discussion in #50. I came across a few other options for configuring test regexes worth considering and if they work out then the main benefit of configuring a single rule.
I'm also going to open up an issue later for cleaning up padding.ts
. I don't think we're going to expose that base rule directly, so there's a lot of clean up i can do in makeRule
and padding.ts
.
LMK if you have any concerns or objections.
Hm. Actually we missed a few...
fit
fdescribe
ftest
(can't tell if this one is real, might just be test.only
)
xit
xdescribe
xtest
I can take care of those along with padding-around-all
^^
Awesome thanks. We should probably also add test cases for test.only
, it.only
and describe.only
as well as test.skip
, it.skip
, and describe.skip
@dangreenisrael if #70 is merged then I'll open a PR for https://github.com/dangreenisrael/eslint-plugin-jest-formatting/tree/51/missing-tokens-and-padding-around-all which is based on the work in #70. That will be the final PR on this issue.
Description
If there are multiple expects intermixed with expressions in a test block things can get a little weird.
Example:
Becomes...
When ideally it would be...
Proposal
I think the fix might just simply be changing the config for
padding-before-expect
inindex.ts
to...As well as adding the same addition to the
padding-before-all
rule.If my guess is correct, then the fix will just be tossing that in and writing some specs. I could be wrong, though... I haven't tested the suggestion at all.
Update, we are going to update all the rules to match this pattern of
around