Skip to content

Conversation

@bytesantiago
Copy link
Contributor

@bytesantiago bytesantiago commented Aug 17, 2021

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"
    }
  }

package-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or package.json. It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates.

@codecov
Copy link

codecov bot commented Aug 17, 2021

Codecov Report

Merging #726 (2f52ed8) into master (9a68415) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #726      +/-   ##
==========================================
+ 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 a96d64b...2f52ed8. Read the comment docs.

@scastillo-jp scastillo-jp force-pushed the TT-313-Run-the-unit-test-before-run-the-pre-commit branch from 2f52ed8 to a96d64b Compare August 19, 2021 19:16
@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
No Duplication information No Duplication information

@scastillo-jp scastillo-jp deleted the TT-313-Run-the-unit-test-before-run-the-pre-commit branch August 19, 2021 19:19
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.

4 participants