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

support seeding entire folders (string path to folder) #213

Merged
merged 4 commits into from Dec 22, 2014
Merged
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

remove hack from tests

  • Loading branch information
feross committed Dec 17, 2014
commit d0436e41e72780d001048079bf265c08ecb1fd53
@@ -63,7 +63,7 @@ test('client.seed (filesystem path to folder (string))', function (t) {
private: false // also force `private: false` to match transmission
}

var client = new WebTorrent({ dht: false, trackers: false })
var client = new WebTorrent({ dht: false, tracker: false })
client.seed(numbersPath, opts, function (torrent) {
t.equal(torrent.infoHash, '80562f38656b385ea78959010e51a2cc9db41ea0')
client.destroy()
@@ -52,13 +52,7 @@ test('client.seed (Buffer, Blob)', function (t) {
// Blob
if (typeof Blob !== 'undefined') {
var client2 = new WebTorrent({ dht: false, tracker: false })
var blob = new Blob([ leavesBook ])

// TODO: just pass name in the opts object – this should work
// Doing it this way until we use the create-torrent code to process inputs
// in client.seed
blob.name = opts.name
client2.seed(blob, function (torrent) {
client2.seed(new Blob([ leavesBook ]), opts, function (torrent) {
verify(t, client2, torrent)
})
} else {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.