0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added possible fix for random test timeouts

no issue

Some tests timeout for an unknown reason. This commit adds some missing awaits for async test methods (that don't perform any async operation, but are marked as async).
This commit is contained in:
Simon Backx 2022-05-30 15:00:55 +02:00 committed by GitHub
parent 438526641b
commit da8cb5c078
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View file

@ -13,7 +13,7 @@ describe('Newsletters Content API', function () {
before(async function () { before(async function () {
agent = await agentProvider.getContentAPIAgent(); agent = await agentProvider.getContentAPIAgent();
await fixtureManager.init('api_keys', 'newsletters'); await fixtureManager.init('api_keys', 'newsletters');
agent.authenticate(); await agent.authenticate();
}); });
it('Can request only active newsletters', async function () { it('Can request only active newsletters', async function () {

View file

@ -15,7 +15,7 @@ describe('Offers Content API', function () {
before(async function () { before(async function () {
agent = await agentProvider.getContentAPIAgent(); agent = await agentProvider.getContentAPIAgent();
await fixtureManager.init('api_keys', 'members'); await fixtureManager.init('api_keys', 'members');
agent.authenticate(); await agent.authenticate();
}); });
it('Can read offer details from id', async function () { it('Can read offer details from id', async function () {

View file

@ -19,7 +19,7 @@ describe('Pages Content API', function () {
before(async function () { before(async function () {
agent = await agentProvider.getContentAPIAgent(); agent = await agentProvider.getContentAPIAgent();
await fixtureManager.init('users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); await fixtureManager.init('users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys');
agent.authenticate(); await agent.authenticate();
}); });
it('Can request pages', async function () { it('Can request pages', async function () {

View file

@ -28,7 +28,7 @@ describe('Posts Content API', function () {
before(async function () { before(async function () {
agent = await agentProvider.getContentAPIAgent(); agent = await agentProvider.getContentAPIAgent();
await fixtureManager.init('owner:post', 'users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys', 'newsletters', 'members:newsletters'); await fixtureManager.init('owner:post', 'users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys', 'newsletters', 'members:newsletters');
agent.authenticate(); await agent.authenticate();
// Assign a newsletter to one of the posts // Assign a newsletter to one of the posts
const newsletterId = testUtils.DataGenerator.Content.newsletters[0].id; const newsletterId = testUtils.DataGenerator.Content.newsletters[0].id;

View file

@ -11,7 +11,7 @@ describe('Settings Content API', function () {
before(async function () { before(async function () {
agent = await agentProvider.getContentAPIAgent(); agent = await agentProvider.getContentAPIAgent();
await fixtureManager.init('api_keys'); await fixtureManager.init('api_keys');
agent.authenticate(); await agent.authenticate();
}); });
it('Can request settings', async function () { it('Can request settings', async function () {

View file

@ -6,7 +6,7 @@ describe('Tiers Content API', function () {
before(async function () { before(async function () {
agent = await agentProvider.getContentAPIAgent(); agent = await agentProvider.getContentAPIAgent();
await fixtureManager.init('members', 'api_keys', 'tiers:archived'); await fixtureManager.init('members', 'api_keys', 'tiers:archived');
agent.authenticate(); await agent.authenticate();
}); });
it('Can request only active tiers', async function () { it('Can request only active tiers', async function () {