Skip to content

Commit

Permalink
fix(mock-connection): use this.muxer.close
Browse files Browse the repository at this point in the history
  • Loading branch information
tabcat committed Oct 13, 2024
1 parent c5bbb25 commit 524e632
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/interface-compliance-tests/src/mocks/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,15 @@ class MockConnection implements Connection {

async close (options?: AbortOptions): Promise<void> {
this.status = 'closing'
await Promise.all(
this.streams.map(async s => s.close(options))
)
await this.muxer.close()
await this.maConn.close()
this.status = 'closed'
this.timeline.close = Date.now()
}

abort (err: Error): void {
this.status = 'closing'
this.streams.forEach(s => {
s.abort(err)
})
this.muxer.abort(err)

Check warning on line 111 in packages/interface-compliance-tests/src/mocks/connection.ts

View check run for this annotation

Codecov / codecov/patch

packages/interface-compliance-tests/src/mocks/connection.ts#L111

Added line #L111 was not covered by tests
this.maConn.abort(err)
this.status = 'closed'
this.timeline.close = Date.now()
Expand Down

0 comments on commit 524e632

Please sign in to comment.