getGhostAPIAgent = async () => {
    const bootOptions = {
        frontend: false
    };

    try {
        const app = await startGhost(bootOptions);
        const originURL = configUtils.config.get('url');

        return new GhostAPITestAgent(app, {
            apiURL: '/ghost/',
            originURL
        });
    } catch (error) {
        error.message = `Unable to create test agent. ${error.message}`;
        throw error;
    }
}
Creates a GhostAPITestAgent, which is a drop-in substitution for supertest
It is automatically hooked up to the Ghost API so you can make requests to e.g.
agent.get('/well-known/jwks.json') without having to worry about URL paths

@returns {Promise<InstanceType<GhostAPITestAgent>>} agent