Skip to content

Commit

Permalink
chore: simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Oct 23, 2024
1 parent 00f9233 commit f023585
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
15 changes: 4 additions & 11 deletions packages/transport-tcp/test/listen-dial.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { pipe } from 'it-pipe'
import pDefer from 'p-defer'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { tcp } from '../src/index.js'
import { delay } from './utils.js'
import type { MultiaddrConnection, Transport, Upgrader } from '@libp2p/interface'

const isCI = process.env.CI
Expand Down Expand Up @@ -406,13 +405,10 @@ describe('dial', () => {
async upgradeInbound () {
upgradeStarted.resolve()

// make the upgrade stall - delay for longer than the test timeout
await delay(120000)

throw new Error('Upgrade failed')
return new Promise(() => {})
},
async upgradeOutbound () {
throw new Error('Not implemented')
return new Promise(() => {})
}

Check warning on line 412 in packages/transport-tcp/test/listen-dial.spec.ts

View check run for this annotation

Codecov / codecov/patch

packages/transport-tcp/test/listen-dial.spec.ts#L411-L412

Added lines #L411 - L412 were not covered by tests
}
})
Expand Down Expand Up @@ -452,13 +448,10 @@ describe('dial', () => {
once: true
})

// make the upgrade stall - delay for longer than the test timeout
await delay(120000)

throw new Error('Upgrade failed')
return new Promise(() => {})
},
async upgradeOutbound () {
throw new Error('Not implemented')
return new Promise(() => {})
}

Check warning on line 455 in packages/transport-tcp/test/listen-dial.spec.ts

View check run for this annotation

Codecov / codecov/patch

packages/transport-tcp/test/listen-dial.spec.ts#L454-L455

Added lines #L454 - L455 were not covered by tests
}
})
Expand Down
12 changes: 0 additions & 12 deletions packages/transport-tcp/test/utils.ts

This file was deleted.

0 comments on commit f023585

Please sign in to comment.