Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for downloading the file to the bit bucket.
- Loading branch information
1 parent
9b5b5e9
commit b450978
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
var http = require('../'); | ||
|
||
var assert = require('assert'); | ||
var common = require('./includes/common.js'); | ||
|
||
var callback = false; | ||
|
||
var server = common.createFooServer(false, function () { | ||
http.get({url: common.options.url}, null, function (err, res) { | ||
callback = true; | ||
assert.ifError(err); | ||
if (process.platform === 'win32') { | ||
assert.deepEqual('NUL:', res.file); | ||
} else { | ||
assert.deepEqual('/dev/null', res.file); | ||
} | ||
server.close(); | ||
}); | ||
}); | ||
|
||
process.on('exit', function () { | ||
assert.ok(callback); | ||
}); |