Skip to content
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

Testing Up to 100% #1443

Merged
merged 1 commit into from
Mar 6, 2022
Merged

Conversation

robertrico
Copy link
Contributor

Brought Testing up to 100% Code Coverage
Removed Console Log
New Lines

The code coverage in the current state was not 100%. To start contributing I thought it'd be good to get this brought to 100% while investing deeper into the codebase.

Description

  • Tested LazyServiceIdentifier unwrap call.
  • Tested unwrap LazyServiceIdentifier in getConstructorArgsAsTarget
  • Removed Console Log in resolver test
  • Tested the asynchronous unbinds for PromiseLike singletons
  • Tested getNamed on binding factory
  • Tested null binding contraint whenTargetIsDefault is called

Related Issue

#1426

Motivation and Context

Getting my feet wet in contributing to InversifyJS. My team and I use this in our production platform and I would like to have more insight, knowledge and better knowing this core feature stays up to date.

How Has This Been Tested?

Ran npm test over and over and over. Scanned for es-lint errors and made sure coverage was 100% in nyc HTML code coverage page.

Types of changes

  • Updated docs / Refactor code / Added a tests case (non-breaking change)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the changelog.

Brought Testing up to 100% Code Coverage
Removed Console Log
New Lines
@codecov-commenter
Copy link

Codecov Report

Merging #1443 (5efd4a6) into master (715a3f9) will increase coverage by 0.58%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1443      +/-   ##
==========================================
+ Coverage   99.26%   99.85%   +0.58%     
==========================================
  Files          53       53              
  Lines        1367     1367              
  Branches      192      192              
==========================================
+ Hits         1357     1365       +8     
+ Misses          5        0       -5     
+ Partials        5        2       -3     
Impacted Files Coverage Δ
src/container/container.ts 100.00% <0.00%> (+0.76%) ⬆️
src/syntax/binding_to_syntax.ts 100.00% <0.00%> (+1.88%) ⬆️
src/planning/reflection_utils.ts 100.00% <0.00%> (+2.27%) ⬆️
src/syntax/binding_when_syntax.ts 100.00% <0.00%> (+4.08%) ⬆️
src/annotation/lazy_service_identifier.ts 100.00% <0.00%> (+33.33%) ⬆️

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 715a3f9...5efd4a6. Read the comment docs.

@PodaruDragos
Copy link
Contributor

LGTM. Thanks for doing this.

FYI we had a talk where we wanted to move everything to jest.
Are you interested in that port ?

I'll merge this regardless.

@PodaruDragos PodaruDragos merged commit 922a09c into inversify:master Mar 6, 2022
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.

3 participants