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

Improve tests; misc fixes #532

Merged
merged 9 commits into from Dec 18, 2015
Merged

Improve tests; misc fixes #532

merged 9 commits into from Dec 18, 2015

Conversation

@feross
Copy link
Member

feross commented Dec 17, 2015

Large PRs that contain multiple, unrelated changes are a bad idea. Nonetheless, here is a bunch of changes that I worked on while on a plane, in one large PR.

The primary purpose of this PR was to remove redundancy and repeated code from the test files. The common torrent test files that we use (pride and leaves) are moved into a new fixture file: test/common.js that all test files can now use. This is more consistent, and saves multiple requires and removes boilerplate.

I also removed all trackers from the sample torrent files since most tests just removed them at the start anyway. Our test suite has to work entirely offline, so contacting the network is not allowed in tests.

Errors in the *.destroy methods are no longer ignored, and they'll fail the tests now, too.

Not all test files are ported over yet. That will come in later PRs. Feel free to help out! Feedback on this PR welcome.

feross added 9 commits Dec 10, 2015
- Download link uses correct filename
- List shows file paths, not just name
- Add file size
- Show torrent name at top, instead of generic “WebTorrent” title
- check that index page works
- wait for destroy
Instead of “WebTorrent/0.63.0”, it’s now “WebTorrent/0063”.
When the user sets `{ tracker: false }` on the WebTorrent client, don’t
add trackers to the torrent by default.
feross added a commit that referenced this pull request Dec 18, 2015
Improve tests; misc fixes
@feross feross merged commit 03b1647 into master Dec 18, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@feross feross deleted the airplane-to-nz branch Dec 18, 2015
@lock

This comment has been minimized.

Copy link

lock bot commented May 5, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.