-
Notifications
You must be signed in to change notification settings - Fork 0
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
feature: Add all resolvers unit tests #12 #55
Conversation
@ynahmany this is a massive PR with 2 weeks works and I changed/added many features and touched many files. |
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
==========================================
+ Coverage 89.64% 97.90% +8.26%
==========================================
Files 63 75 +12
Lines 792 1387 +595
Branches 67 164 +97
==========================================
+ Hits 710 1358 +648
+ Misses 82 29 -53
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finish the review.
most of the tests - I reviewed, but my CR there was not that effective.
src/db/index.ts
Outdated
|
||
export const EntitiesTags = { | ||
dependencyVersion: Symbol.for(`DependencyVersion`), | ||
dependency: Symbol.for(`Dependency`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps Dependency.Name will work? not sure though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check, it might but I think it can cause a circular dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
src/resolvers/ciResolver/impl/resolvers/githubActions/githubActionsConfigParser.ts
Show resolved
Hide resolved
propertyKey: TKey, | ||
descriptor: TypedPropertyDescriptor<GenericFunction<A>> | ||
): void => { | ||
descriptor.value = memoizeFn(propertyKey, descriptor.value!, keyBuilder || defaultKeyBuilder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for myself to speak with you about it.
@@ -1,4 +1,4 @@ | |||
import { BindingTypes, testBindings } from '../../../common/bindingTester'; | |||
import { BindingTypes, testBindings } from '../../../common/testers/bindingTester'; | |||
import { ITestResolver, testResolverModulesBinder } from '../../../../src/resolvers/testResolver'; | |||
import { TestResolver } from '../../../../src/resolvers/testResolver/impl/testResolver'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is only import and no export here..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a test which invokes the testBindings method. No need to export anything.
Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so there is no invokation what so ever?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is one just 1 line below
@ynahmany thanks for the review! |
Fix #12
Changes:
dependencyChecker
nodeVersions
as it can now handle more variations of node versions placeholders (like code names)extended-jest-mock
which is typesafe@injectable
in interfaces as it is redundant - we only need injection in concrete classes