Ghost/test/utils/ghost-api-test-agent.js
Naz a18469a3be Added root Ghost server/API test agent
refs https://github.com/TryGhost/Team/issues/1640

- Some tests require making request to the root of the mounted server path like `GET /ghost/.well-known/jwks.json`. These are not stricly APIs like Admin, Content, and Members. They do need a separate agent to distinguish the configuration - for this agetn we can stop loading some parts like "server" in the future to speed things up (didn't work straight out of the box)
2022-05-20 13:17:00 +08:00

20 lines
603 B
JavaScript

const TestAgent = require('./test-agent');
/**
* NOTE: this class is not doing much at the moment. It's rather a placeholder to test
* any Ghost API specific functionality, like /.well-known. If there is none in the nearest
* future, it would make sense to remove it alltogether.
* @constructor
* @param {Object} app Ghost express app instance
* @param {Object} options
* @param {String} options.apiURL
* @param {String} options.originURL
*/
class GhostAPITestAgent extends TestAgent {
constructor(app, options) {
super(app, options);
}
}
module.exports = GhostAPITestAgent;