Skip to content

Conversation

bytesantiago
Copy link
Contributor

Observation

It would be better if we run unit tests before commiting, and only commit and push after tests are successful.

Solution

To do so, on the package.json file it was needed just to modify the husky configuration as follows:

"husky": {
    "hooks": {
      "commit-msg": "commit-message-validator",
      "pre-commit": "ng lint && ng test --watch=false --browsers=ChromeHeadless"
    }
  }

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Aug 19, 2021

Codecov Report

Merging #730 (ba5db3d) into master (9a68415) will increase coverage by 0.09%.
The diff coverage is 100.00%.

❗ Current head ba5db3d differs from pull request most recent head 8b7e3dc. Consider uploading reports for the commit 8b7e3dc to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #730      +/-   ##
==========================================
+ Coverage   95.24%   95.33%   +0.09%     
==========================================
  Files         106      106              
  Lines        2206     2251      +45     
  Branches      169      170       +1     
==========================================
+ Hits         2101     2146      +45     
  Misses         61       61              
  Partials       44       44              
Impacted Files Coverage Δ
...sers/components/users-list/users-list.component.ts 100.00% <100.00%> (ø)
src/app/modules/users/store/user.actions.ts 100.00% <100.00%> (ø)
src/app/modules/users/store/user.effects.ts 100.00% <100.00%> (ø)
src/app/modules/users/store/user.reducers.ts 96.55% <100.00%> (+1.81%) ⬆️
src/environments/environment.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b375dc...8b7e3dc. Read the comment docs.

@bytesantiago bytesantiago merged commit c26659b into master Aug 19, 2021
@bytesantiago bytesantiago deleted the TT-313-Run-the-unit-test-before-run-the-precommit branch August 19, 2021 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants