Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsed torrent #1770

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Move comment

  • Loading branch information
alxhotel committed Oct 28, 2019
commit 250d3d7d03548281c93ebe09ca4b3dcb4c6d2fd7
@@ -207,6 +207,7 @@ test('client.add: invalid torrent id: short buffer', function (t) {
})

test('client.add: non-bittorrent URNs', function (t) {
// Non-bittorrent URNs (examples from Wikipedia)
const magnets = [
'magnet:?xt=urn:sha1:PDAQRAOQQRYS76MRZJ33LK4MMVZBDSCL',
'magnet:?xt=urn:tree:tiger:IZZG2KNL4BKA7LYEKK5JAX6BQ27UV4QZKPL2JZQ',
@@ -227,12 +228,10 @@ test('client.add: non-bittorrent URNs', function (t) {
t.ok(err.message.indexOf('Invalid torrent identifier') >= 0)

done += 1

if (done === magnets.length) client.destroy(function (err) { t.error(err, 'client destroyed') })
})
client.on('warning', function (err) { t.fail(err) })

// Non-bittorrent URNs (examples from Wikipedia)
magnets.forEach(function (magnet) {
client.add(magnet)
})
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.