mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Fixed frontend initialization in "mock-express" tests
refs https://github.com/TryGhost/Toolbox/issues/135 - Without sensible defaults the web app was not initializing either the backend nor the frontned parts of the application. Fixed the defaults so the problem doesn't happen again and optimized mock-express-style initialization to only initialize the frontend routing
This commit is contained in:
parent
d0dfac438d
commit
149c100b4c
2 changed files with 6 additions and 4 deletions
|
@ -8,10 +8,10 @@ const vhost = require('@tryghost/vhost-middleware');
|
|||
/**
|
||||
* @param {Object} options
|
||||
* @param {Boolean} [options.start]
|
||||
* @param {Boolean} options.withBackend
|
||||
* @param {Boolean} options.withFrontend
|
||||
* @param {Boolean} [options.withBackend]
|
||||
* @param {Boolean} [options.withFrontend]
|
||||
*/
|
||||
module.exports = function setupParentApp({start, withFrontend, withBackend}) {
|
||||
module.exports = function setupParentApp({start, withFrontend = true, withBackend = true}) {
|
||||
debug('ParentApp setup start');
|
||||
const parentApp = express('parent');
|
||||
|
||||
|
|
|
@ -59,7 +59,9 @@ module.exports = {
|
|||
const helperService = require('../../../../core/frontend/services/helpers');
|
||||
await helperService.init();
|
||||
|
||||
const app = siteApp({start: true});
|
||||
const app = siteApp({
|
||||
start: true
|
||||
});
|
||||
await appService.init();
|
||||
await urlServiceUtils.isFinished();
|
||||
|
||||
|
|
Loading…
Reference in a new issue