-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Implement assertions for network primitives #133
Conversation
947eddb
to
2609dd6
Compare
Codecov Report
@@ Coverage Diff @@
## master #133 +/- ##
==========================================
+ Coverage 64.37% 65.05% +0.67%
==========================================
Files 35 39 +4
Lines 553 724 +171
Branches 104 155 +51
==========================================
+ Hits 356 471 +115
- Misses 187 242 +55
- Partials 10 11 +1
Continue to review full report at Codecov.
|
3b49cfc
to
70b10f2
Compare
toBeCalled matcher overwrites jests builtin one. |
Would that be a problem, given that users aren't likely to use stubbing of functions in e2e test context? We could also name it |
Actually I like these names much more .. I will update it. |
Matcher names looks good, I'll proceed reviewing later today |
Will it be possible to verify not just body but headers, url as well? |
@mgrybyk added feature that allows expect(mock).toBeRequestedTimes(1)
// is the same as
expect(mock).toBeRequestedTimes({ eq: 1 })
// also possible
expect(mock).toBeRequestedTimes({ lte: 2 })
expect(mock).toBeRequestedTimes({ gte: 2 }) Error message is:
What do you think? |
300e53c
to
d85f963
Compare
Looks good, let's fix the failing tests and merge |
The tests are passing, not sure why the push check fails. I will merge and check if master passes. |
After we landed network primitives in WebdriverIO our next step is to add proper expect matchers making the assertion easy. This patch adds: