|
|
@ -97,12 +97,11 @@ module.exports.tests.factory = function(test, common) { |
|
|
|
// null transport
|
|
|
|
// null transport
|
|
|
|
module.exports.tests.NullTransport = function(test, common) { |
|
|
|
module.exports.tests.NullTransport = function(test, common) { |
|
|
|
|
|
|
|
|
|
|
|
test('http adapter', function(t) { |
|
|
|
test('null transport', function(t) { |
|
|
|
var config = {}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// adapter is driven by config
|
|
|
|
// adapter is driven by config
|
|
|
|
var tmpfile = tmp.tmpNameSync({ postfix: '.json' }); |
|
|
|
var tmpfile = tmp.tmpNameSync({ postfix: '.json' }); |
|
|
|
fs.writeFileSync( tmpfile, JSON.stringify( config ), { encoding: 'utf8' } ); |
|
|
|
fs.writeFileSync( tmpfile, '{}', { encoding: 'utf8' } ); |
|
|
|
process.env.PELIAS_CONFIG = tmpfile; |
|
|
|
process.env.PELIAS_CONFIG = tmpfile; |
|
|
|
var adapter = setup(); |
|
|
|
var adapter = setup(); |
|
|
|
delete process.env.PELIAS_CONFIG; |
|
|
|
delete process.env.PELIAS_CONFIG; |
|
|
|