Skip to content

Commit

Permalink
Return this
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacse committed Jul 22, 2020
1 parent 24f34a7 commit 38e0749
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ declare class ClientMock {
constructor()
add(pattern: MockPattern, resolver: ResolverFn): ClientMock
get(pattern: MockPattern): ResolverFn | null
clear(pattern: Pick<MockPattern, 'method' | 'path'>): void
clearAll(): void
clear(pattern: Pick<MockPattern, 'method' | 'path'>): ClientMock
clearAll(): ClientMock
getConnection(): typeof Connection
}

Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ class Mocker {
if (typeof pattern.path !== 'string') throw new ConfigurationError('The path is not defined')

this[kRouter].off(pattern.method, pattern.path)
return this
}

clearAll () {
this[kRouter].reset()
return this
}

getConnection () {
Expand Down

0 comments on commit 38e0749

Please sign in to comment.