mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
Fix failing test after bluebird removal
This commit is contained in:
parent
4e6912b65f
commit
8c2ba0415f
@ -20,7 +20,7 @@ const createApp = migrator(options.databaseUri).then(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function createStrategies (stores) {
|
function createStrategies (stores) {
|
||||||
return BPromise.map([
|
return [
|
||||||
{
|
{
|
||||||
name: 'default',
|
name: 'default',
|
||||||
description: 'Default on or off Strategy.',
|
description: 'Default on or off Strategy.',
|
||||||
@ -33,11 +33,11 @@ function createStrategies (stores) {
|
|||||||
emails: 'String',
|
emails: 'String',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
], strategy => stores.strategyStore._createStrategy(strategy));
|
].map(strategy => stores.strategyStore._createStrategy(strategy));
|
||||||
}
|
}
|
||||||
|
|
||||||
function createFeatures (stores) {
|
function createFeatures (stores) {
|
||||||
return BPromise.map([
|
return [
|
||||||
{
|
{
|
||||||
name: 'featureX',
|
name: 'featureX',
|
||||||
description: 'the #1 feature',
|
description: 'the #1 feature',
|
||||||
@ -97,7 +97,7 @@ function createFeatures (stores) {
|
|||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
], feature => stores.featureToggleStore._createFeature(feature));
|
].map(feature => stores.featureToggleStore._createFeature(feature));
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroyStrategies (stores) {
|
function destroyStrategies (stores) {
|
||||||
@ -109,11 +109,11 @@ function destroyFeatures (stores) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resetDatabase (stores) {
|
function resetDatabase (stores) {
|
||||||
return BPromise.all([destroyStrategies(stores), destroyFeatures(stores)]);
|
return Promise.all([destroyStrategies(stores), destroyFeatures(stores)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupDatabase (stores) {
|
function setupDatabase (stores) {
|
||||||
return BPromise.all([createStrategies(stores), createFeatures(stores)]);
|
return Promise.all(createStrategies(stores).concat(createFeatures(stores)))
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
Loading…
Reference in New Issue
Block a user