mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Rewrote reload routes.yaml test to use async/await
no issue
This commit is contained in:
parent
f0b8e9693f
commit
04ab59c859
1 changed files with 7 additions and 12 deletions
|
@ -607,17 +607,12 @@ describe('Dynamic Routing', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Reload routes.yaml', function () {
|
describe('Reload routes.yaml', function () {
|
||||||
before(function (done) {
|
before(async function () {
|
||||||
testUtils.clearData().then(function () {
|
await testUtils.clearData();
|
||||||
// we initialise data, but not a user. No user should be required for navigating the frontend
|
// we initialize data, but not a user. No user should be required for navigating the frontend
|
||||||
return testUtils.initData();
|
await testUtils.initData();
|
||||||
}).then(function () {
|
await testUtils.fixtures.overrideOwnerUser('ghost-owner');
|
||||||
return testUtils.fixtures.overrideOwnerUser('ghost-owner');
|
await testUtils.initFixtures('settings');
|
||||||
}).then(function () {
|
|
||||||
return testUtils.initFixtures('settings');
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
}).catch(done);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
after(testUtils.teardownDb);
|
after(testUtils.teardownDb);
|
||||||
|
@ -644,7 +639,7 @@ describe('Dynamic Routing', function () {
|
||||||
path: path.join(config.get('paths:appRoot'), 'test', 'utils', 'fixtures', 'settings', 'newroutes.yaml')
|
path: path.join(config.get('paths:appRoot'), 'test', 'utils', 'fixtures', 'settings', 'newroutes.yaml')
|
||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
return urlServiceUtils.isFinished({disableDbReadyEvent: true});
|
return urlServiceUtils.isFinished();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue