Move tests

This commit is contained in:
Maciej Małecki 2014-04-11 01:14:28 +02:00
parent f376e96ab2
commit 016f1351bd
10 changed files with 517 additions and 0 deletions

View 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);
});
};