Moved startGhost function to local utils

refs https://github.com/TryGhost/Toolbox/issues/135

- Having the proxy in local utils allows to disable frontend gradually in test suites instead of all at once (the latter approach didn't work out as too many other suites still depend on full frontend initialization)
This commit is contained in:
Naz 2021-11-18 12:38:55 +04:00 committed by naz
parent 008b6e0fae
commit 9359ae923d
2 changed files with 17 additions and 0 deletions

View File

@ -207,5 +207,14 @@ module.exports = {
Buffer.from(testUtils.DataGenerator.Content.api_keys[0].secret, 'hex'),
JWT_OPTIONS
);
},
async startGhost(overrides = {}) {
const defaults = {
withBackend: true,
withFrontend: false
};
return await testUtils.startGhost(Object.assign(defaults, overrides));
}
};

View File

@ -96,5 +96,13 @@ module.exports = {
},
getValidKey() {
return testUtils.DataGenerator.Content.api_keys[1].secret;
},
async startGhost(overrides = {}) {
const defaults = {
withBackend: true,
withFrontend: false
};
return await testUtils.startGhost(Object.assign(defaults, overrides));
}
};