Skip to content

Commit

Permalink
fix: Add duplicate function to support instance duplication for TypeS…
Browse files Browse the repository at this point in the history
…cript mocks (#1109)

Co-authored-by: Daniël Schutte <daniel.schutte@noordhoff.nl>
  • Loading branch information
byssell and Daniël Schutte authored Jan 21, 2022
1 parent b6805ed commit f84897d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ class RedisMock extends EventEmitter {
return mock;
}

duplicate() {
return this.createConnectedClient()
}

// eslint-disable-next-line class-methods-use-this
disconnect() {
const removeFrom = ({ instanceListeners }) => {
Expand Down

0 comments on commit f84897d

Please sign in to comment.