Move tests
This commit is contained in:
parent
f376e96ab2
commit
016f1351bd
10 changed files with 517 additions and 0 deletions
14
test/helpers/create-https-server.js
Normal file
14
test/helpers/create-https-server.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var https = require('https');
|
||||
var fixtures = path.join(__dirname, '..', 'fixtures');
|
||||
|
||||
module.exports = function(handler, callback) {
|
||||
var server = https.createServer({
|
||||
key: fs.readFileSync(path.join(fixtures, 'privatekey.pem')),
|
||||
cert: fs.readFileSync(path.join(fixtures, 'certificate.pem'))
|
||||
}, handler);
|
||||
server.listen(0, function() {
|
||||
callback(null, server);
|
||||
});
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue