test/kvao: setup global.Promise on Node v0.10

When running the tests on Node v0.10, setup `global.Promise`
with Bluebird implementation. That way we don't have to run
this setup in the test suite of each kv connector.
This commit is contained in:
Miroslav Bajtoš 2016-08-12 16:33:05 +02:00
parent d8d89bea9d
commit 9d0d41d660
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,9 @@ var debug = require('debug')('test');
var fs = require('fs');
var path = require('path');
if (!global.Promise)
global.Promise = require('bluebird');
module.exports = function(dataSourceFactory, connectorCapabilities) {
describe('KeyValue API', function loadAllTestFiles() {
var testRoot = path.resolve(__dirname, 'kvao');