We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d982ff9 commit 289f6d1Copy full SHA for 289f6d1
1 file changed
test/encode.test.js
@@ -120,6 +120,11 @@ test('bencode#encode()', function (t) {
120
t.equal(bencode.encode([32, 12]).toString(), 'li32ei12ee')
121
t.equal(bencode.encode([':asdf:']).toString(), 'l6::asdf:e')
122
})
123
+ t.test('should be able to encode a Set as a list', function (t) {
124
+ t.plan(2)
125
+ t.equal(bencode.encode(new Set([32, 12])).toString(), 'li32ei12ee')
126
+ t.equal(bencode.encode(new Set([':asdf:'])).toString(), 'l6::asdf:e')
127
+ })
128
t.test('should be able to encode an object', function (t) {
129
t.plan(3)
130
t.equal(bencode.encode({ 'a': 'bc' }).toString(), 'd1:a2:bce')
0 commit comments