mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
23 lines
559 B
JavaScript
23 lines
559 B
JavaScript
|
const Agent = require('@tryghost/express-test');
|
||
|
|
||
|
/**
|
||
|
* @constructor
|
||
|
* @param {Object} app Ghost express app instance
|
||
|
* @param {Object} options
|
||
|
* @param {String} options.apiURL
|
||
|
* @param {String} options.originURL
|
||
|
*/
|
||
|
class MembersAPITestAgent extends Agent {
|
||
|
constructor(app, options) {
|
||
|
super(app, {
|
||
|
baseUrl: options.apiURL,
|
||
|
headers: {
|
||
|
host: options.originURL.replace(/http:\/\//, ''),
|
||
|
origin: options.originURL
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = MembersAPITestAgent;
|