-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
Add more tests #664
Add more tests #664
Conversation
Codecov Report
@@ Coverage Diff @@
## master #664 +/- ##
=======================================
Coverage 99.67% 99.67%
=======================================
Files 11 11
Lines 305 305
Branches 57 57
=======================================
Hits 304 304
Misses 1 1 Continue to review full report at Codecov.
|
869c61d
to
1d94a49
Compare
Is this mergeable? Shouldn’t the second test fail until we fixed the root cause? |
@okonet I made the test to expect the failure result, so it succeeds. When the issue gets fixed, the test will start failing. Given how the linter task creates a git lock, all git operations from there onwards will fail, so I doubt we can ever cleanly recover from it. |
Great! Let’s merge then. Can you rebase it please? |
Alright, rebased. |
I've rebased against latest master, but sadly have no permissions to merge myself. |
I think to solve that I’d need to create a separate organization. Thoughts? |
🎉 This PR is included in version 9.2.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR adds two tests.
1: Should clear unstaged changes when linter applies same changes
lint-staged
runsprettier --fix
andgit add
to essentially do the same thing as the unstaged modificationsThe result:
lint-staged
succesfully fixed and committed the file2: should fail when linter creates a .git/index.lock
lint-staged
runsprettier --fix
andgit add
, but also create a.git/index.lock
file, failing git operations (like thegit add
)The result:
lint-staged
fails to create a new commitgit status
matches the status before committing, but prettier's changes have been staged