0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/test/utils/test-agent.js

23 lines
539 B
JavaScript
Raw Normal View History

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 TestAgent extends Agent {
constructor(app, options) {
super(app, {
baseUrl: options.apiURL,
headers: {
host: options.originURL.replace(/http:\/\//, ''),
origin: options.originURL
}
});
}
}
module.exports = TestAgent;