mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
a18469a3be
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)
20 lines
603 B
JavaScript
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;
|