mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fixed test that left an instance of ghost running (#21178)
no issue - This test file starts a Ghost server, but doesn't close it, which can cause other tests to fail when they try to start an instance of Ghost, with an `EADDRINUSE` error. - This change closes the server in the `after` hook
This commit is contained in:
parent
6965254b3f
commit
bf7320cfb7
1 changed files with 6 additions and 2 deletions
|
@ -8,11 +8,11 @@ const membersEventsService = require('../../core/server/services/members-events'
|
||||||
|
|
||||||
describe('Click Tracking', function () {
|
describe('Click Tracking', function () {
|
||||||
let agent;
|
let agent;
|
||||||
|
let ghostServer;
|
||||||
let webhookMockReceiver;
|
let webhookMockReceiver;
|
||||||
|
|
||||||
before(async function () {
|
before(async function () {
|
||||||
const {adminAgent} = await agentProvider.getAgentsWithFrontend();
|
({adminAgent: agent, ghostServer} = await agentProvider.getAgentsWithFrontend());
|
||||||
agent = adminAgent;
|
|
||||||
await fixtureManager.init('newsletters', 'members:newsletters', 'integrations');
|
await fixtureManager.init('newsletters', 'members:newsletters', 'integrations');
|
||||||
await agent.loginAsOwner();
|
await agent.loginAsOwner();
|
||||||
});
|
});
|
||||||
|
@ -28,6 +28,10 @@ describe('Click Tracking', function () {
|
||||||
mockManager.restore();
|
mockManager.restore();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
after(async function () {
|
||||||
|
await ghostServer.stop();
|
||||||
|
});
|
||||||
|
|
||||||
it('Full test', async function () {
|
it('Full test', async function () {
|
||||||
const siteUrl = new URL(urlUtils.urlFor('home', true));
|
const siteUrl = new URL(urlUtils.urlFor('home', true));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue