-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: sociable unit test functionality #275
base: master-suites
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master-suites #275 +/- ##
=================================================
- Coverage 93.41% 92.61% -0.80%
=================================================
Files 19 24 +5
Lines 410 501 +91
Branches 81 91 +10
=================================================
+ Hits 383 464 +81
- Misses 16 27 +11
+ Partials 11 10 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
aa798a0
to
ee94156
Compare
@soryy708 up for review? |
} | ||
|
||
public static create<TClass = any>(targetClass: Type<TClass>): TestBedBuilder<TClass> { | ||
public static create<TClass = any>(targetClass: Type<TClass>): SolitaryTestBedBuilder<TClass> { |
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.
Backwards-compatible API. Awesome!
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.
lol. Yes it'a gonna be a whole new framework under the scope @suites
.
); | ||
} | ||
|
||
public static sociable<TClass = any>(targetClass: Type<TClass>): SociableTestBedBuilder<TClass> { |
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 couldn't find any tests covering this new user-facing API?
I see tests that cover the insides, but nothing drives it as a user would?
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 e2e
that I need to apply as well, you are right
); | ||
|
||
const testBed = await unitBuilder | ||
.expose(UserApiService) |
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.
Because this is a public user-facing API, lets discuss the chosen terminology expose
, to mark a dependency to not be faked.
What is the mental model Automock tries to give its users about what dependencies get replaced with test-doubles and what aren't?
In my mind for example, since Automock uses the terminology: automock
, mock
... using
, I'd expect this to be called dontMock
or something like that.
Relates to: #230 |
No description provided.