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

fix(jest): interface and string token combination #30

Merged
merged 6 commits into from
Feb 6, 2023

Conversation

omermorad
Copy link
Collaborator

Fixed the way tokens are reflected. Now it won't assume the type is defined and will make the best effort to use the token or type name. There are still scenarios that ref -> Object is left, that I think should throw but that's for another PR.

I removed the duplicates check there because I was not sure what it should do (I can bring it back but I need to know how to integrate it correctly).

I also updated some tests and types because I had false positives during development.

Resolves #25
#26

iddan and others added 2 commits December 13, 2022 11:59
Fixed the way tokens are reflected. Now it won't assume type is defined, and will make best effort to use token or type name.

Removed the duplicates check there because I was not sure what should it do (I can bring it back, just need to know how to integrate it correctly).

Resolves #25
@codecov
Copy link

codecov bot commented Feb 6, 2023

Codecov Report

Merging #30 (cc2da4f) into master (44725cc) will increase coverage by 3.67%.
The diff coverage is 95.45%.

❗ Current head cc2da4f differs from pull request most recent head e7fca28. Consider uploading reports for the commit e7fca28 to get more accurate results

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
+ Coverage   93.58%   97.26%   +3.67%     
==========================================
  Files           6        5       -1     
  Lines          78       73       -5     
  Branches        9       11       +2     
==========================================
- Hits           73       71       -2     
+ Misses          1        0       -1     
+ Partials        4        2       -2     
Flag Coverage Δ
jest 97.26% <95.45%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/jest/src/lib/mock-resolver.ts 100.00% <ø> (ø)
packages/jest/src/lib/reflectable.decorator.ts 100.00% <ø> (ø)
packages/jest/src/lib/reflector.service.ts 94.11% <94.11%> (ø)
packages/jest/src/lib/test-bed-resolver.ts 100.00% <100.00%> (ø)
packages/jest/src/lib/testbed-factory.ts 100.00% <100.00%> (ø)
packages/jest/src/index.ts

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@omermorad omermorad merged commit 5b4c213 into master Feb 6, 2023
@omermorad omermorad deleted the iddan-fix/token-reflection branch February 6, 2023 18:59
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.

bug: combining @Inject() with an interface throws an error
2 participants