Skip to content

Commit 5d119fd

Browse files
authored
Merge pull request webtorrent#345 from webtorrent/fix-tests
2 parents fce9bd8 + cecb778 commit 5d119fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/querystring.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ var test = require('tape')
33

44
// https://github.com/webtorrent/webtorrent/issues/196
55
test('encode special chars +* in http tracker urls', function (t) {
6-
var q = {
7-
info_hash: Buffer.from('a2a15537542b22925ad10486bf7a8b2a9c42f0d1', 'hex').toString('binary')
8-
}
6+
var q = Object.create(null)
7+
q.info_hash = Buffer.from('a2a15537542b22925ad10486bf7a8b2a9c42f0d1', 'hex').toString('binary')
8+
99
var encoded = 'info_hash=%A2%A1U7T%2B%22%92Z%D1%04%86%BFz%8B%2A%9CB%F0%D1'
1010
t.equal(common.querystringStringify(q), encoded)
1111

0 commit comments

Comments
 (0)