MCPcopy
hub / github.com/webtorrent/bittorrent-tracker / testUnsupportedTracker

Function testUnsupportedTracker

test/client.js:513–530  ·  view source on GitHub ↗
(t, announceUrl)

Source from the content-addressed store, hash-verified

511})
512
513function testUnsupportedTracker (t, announceUrl) {
514 t.plan(1)
515
516 const client = new Client({
517 infoHash: fixtures.leaves.parsedTorrent.infoHash,
518 announce: announceUrl,
519 peerId: peerId1,
520 port,
521 wrtc: {}
522 })
523
524 client.on('error', err => { t.error(err) })
525 client.on('warning', err => {
526 t.ok(err.message.includes('tracker'), 'got warning')
527
528 client.destroy()
529 })
530}
531
532test('unsupported tracker protocol', t => {
533 testUnsupportedTracker(t, 'badprotocol://127.0.0.1:8080/announce')

Callers 1

client.jsFile · 0.85

Calls 1

destroyMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…