mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Added new enable labs flag helper for tests
no refs - allows easily enabling alpha features for tests
This commit is contained in:
parent
756bd2bdb5
commit
1107465398
1 changed files with 11 additions and 0 deletions
11
ghost/admin/tests/helpers/enable-labs-flag.js
Normal file
11
ghost/admin/tests/helpers/enable-labs-flag.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
export default function (server, flag) {
|
||||
server.loadFixtures('configs');
|
||||
const config = server.schema.configs.first();
|
||||
config.update({enableDeveloperExperiments: true});
|
||||
|
||||
const labsSetting = {};
|
||||
labsSetting[flag] = true;
|
||||
|
||||
server.loadFixtures('settings');
|
||||
server.db.settings.update({key: 'labs'}, {value: JSON.stringify(labsSetting)});
|
||||
}
|
Loading…
Add table
Reference in a new issue