Skip to content

Conversation

@johanblumenberg
Copy link
Contributor

Add startsWith() and endsWith() string matchers.

Update types on matchers for better type safety.

For example, before this PR, this would be compiling, even though it is invalid code:

class Foo {
  bar(value: { a: string }) {}
}

let foo = mock(Foo);
verify(foo.bar(deepEquals('hello world')).called();

@codecov-io
Copy link

codecov-io commented May 25, 2019

Codecov Report

Merging #139 into master will increase coverage by 0.19%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #139      +/-   ##
==========================================
+ Coverage   94.93%   95.12%   +0.19%     
==========================================
  Files          34       36       +2     
  Lines         612      636      +24     
  Branches       71       75       +4     
==========================================
+ Hits          581      605      +24     
  Misses         22       22              
  Partials        9        9
Impacted Files Coverage Δ
src/matcher/type/StartsWithMatcher.ts 100% <100%> (ø)
src/ts-mockito.ts 97.01% <100%> (+0.29%) ⬆️
src/matcher/type/EndsWithMatcher.ts 100% <100%> (ø)

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 245892c...e59b0c8. Read the comment docs.

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.

2 participants