repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/urlUtils.js | ghost/core/test/utils/urlUtils.js | const sinon = require('sinon');
const UrlUtils = require('@tryghost/url-utils');
const configUtils = require('./configUtils');
const config = require('../../core/shared/config');
const urlUtils = require('../../core/shared/url-utils');
const defaultSandbox = sinon.createSandbox();
const getInstance = (options) => {
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/e2e-framework.js | ghost/core/test/utils/e2e-framework.js | // Set of common function that should be main building blocks for e2e tests.
// The e2e tests usually consist of following building blocks:
// - request agent
// - state builder
// - output state checker (in case we don't get jest snapshots working)
//
// The request agent is responsible for making HTTP-like requests t... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/mocks/index.js | ghost/core/test/utils/mocks/index.js | exports.modules = require('./modules');
| javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/mocks/modules.js | ghost/core/test/utils/mocks/modules.js | const Module = require('module');
const originalRequireFn = Module.prototype.require;
/**
* helper fn to mock non-existent modules
* mocks.modules.mockNonExistentModule(/pattern/, mockedModule)
*/
exports.mockNonExistentModule = (modulePath, module, error = false) => {
Module.prototype.require = function (path)... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/agents/test-agent.js | ghost/core/test/utils/agents/test-agent.js | 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, {
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/agents/index.js | ghost/core/test/utils/agents/index.js | module.exports = {
AdminAPITestAgent: require('./admin-api-test-agent'),
ContentAPITestAgent: require('./content-api-test-agent'),
GhostAPITestAgent: require('./ghost-api-test-agent'),
MembersAPITestAgent: require('./members-api-test-agent')
};
| javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/agents/ghost-api-test-agent.js | ghost/core/test/utils/agents/ghost-api-test-agent.js | 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} a... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/agents/members-api-test-agent.js | ghost/core/test/utils/agents/members-api-test-agent.js | const TestAgent = require('./test-agent');
const errors = require('@tryghost/errors');
/**
* NOTE: this class is not doing much at the moment. It's rather a placeholder to put
* any Members API specific functionality into. If there is none in the nearest
* future, it would make sense to remove it alltogether.
* @c... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/agents/admin-api-test-agent.js | ghost/core/test/utils/agents/admin-api-test-agent.js | const TestAgent = require('./test-agent');
const errors = require('@tryghost/errors');
const DataGenerator = require('../fixtures/data-generator');
const jwt = require('jsonwebtoken');
const roleMap = {
owner: 0,
admin: 1,
editor: 2,
author: 3,
contributor: 7
};
const getRoleUserFromFixtures = (ro... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/agents/content-api-test-agent.js | ghost/core/test/utils/agents/content-api-test-agent.js | const TestAgent = require('./test-agent');
const DataGenerator = require('../fixtures/data-generator');
const defaultContentAPISecretKey = DataGenerator.Content.api_keys[1].secret;
/**
* @constructor
* @param {Object} app Ghost express app instance
* @param {Object} options
* @param {String} options.apiURL
* @p... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/fixtures/cache-rules.js | ghost/core/test/utils/fixtures/cache-rules.js | module.exports = {
public: 'public, max-age=0',
hour: 'public, max-age=' + 3600,
day: 'public, max-age=' + 86400,
year: 'public, max-age=' + 31536000,
yearImmutable: 'public, max-age=' + 31536000 + ', immutable',
private: 'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, ... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/fixtures/data-generator.js | ghost/core/test/utils/fixtures/data-generator.js | const _ = require('lodash');
const crypto = require('crypto');
const ObjectId = require('bson-objectid').default;
const moment = require('moment');
const DataGenerator = {};
DataGenerator.markdownToMobiledoc = function markdownToMobiledoc(content) {
const mobiledoc = {
version: '0.3.1',
markups: [... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/fixtures/context.js | ghost/core/test/utils/fixtures/context.js | const DataGenerator = require('./data-generator');
module.exports = {
internal: {context: {internal: true}},
external: {context: {external: true}},
owner: {context: {user: DataGenerator.Content.users[0].id}},
admin: {context: {user: DataGenerator.Content.users[1].id}},
editor: {context: {user: Data... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/fixtures/themes/source/assets/built/source.js | ghost/core/test/utils/fixtures/themes/source/assets/built/source.js | function dropdown(){const o=window.matchMedia("(max-width: 767px)"),i=document.querySelector(".gh-navigation"),r=i.querySelector(".gh-navigation-menu"),a=r?.querySelector(".nav");if(a){const e=document.querySelector(".gh-navigation-logo"),t=a.innerHTML;o.matches&&a.querySelectorAll("li").forEach(function(e,t){e.style.t... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/fixtures/themes/casper/assets/built/casper.js | ghost/core/test/utils/fixtures/themes/casper/assets/built/casper.js | function lightbox(e){document.querySelectorAll(e).forEach(function(e){e.addEventListener("click",function(e){!function(t){t.preventDefault();for(var n,o=[],i=0,e=t.target.closest(".kg-card").previousElementSibling;e&&(e.classList.contains("kg-image-card")||e.classList.contains("kg-gallery-card"));){var r=[];e.querySele... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/fixtures/filter-param/index.js | ghost/core/test/utils/fixtures/filter-param/index.js | /**
* These fixtures are just for testing the filter spec
*/
const _ = require('lodash');
const ObjectId = require('bson-objectid').default;
const db = require('../../../../core/server/data/db');
const markdownToMobiledoc = require('../data-generator').markdownToMobiledoc;
const data = {};
// Password = Sl1m3rson
d... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/utils/fixtures/export/body-generator.js | ghost/core/test/utils/fixtures/export/body-generator.js | const _ = require('lodash');
const exportedBodyV2 = () => {
return _.clone({
db: [{
meta: {
exported_on: 1504269105806,
version: '2.0.0'
},
data: {
app_fields: [],
app_settings: [],
apps: [],... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/newsletters.test.js | ghost/core/test/e2e-api/content/newsletters.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const newsletterSnapshot = {
id: matchers.anyObjectId,
uuid: matchers.anyUuid,
created_at: matchers.anyISODateTime,
updated_at: matchers.anyISODateTime
};
describe('Newsletters Content API', function () {
let a... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/tiers.test.js | ghost/core/test/e2e-api/content/tiers.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
describe('Tiers Content API', function () {
let agent;
before(async function () {
agent = await agentProvider.getContentAPIAgent();
await fixtureManager.init('members', 'api_keys', 'tiers:archived', 'tiers:... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/recommendations.test.js | ghost/core/test/e2e-api/content/recommendations.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const recommendationsService = require('../../../core/server/services/recommendations');
const {Recommendation} = require('../../../core/server/services/recommendations/service');
const {anyObjectId, anyISODateTime} = matchers;
cons... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/key_authentication.test.js | ghost/core/test/e2e-api/content/key_authentication.test.js | const should = require('should');
const supertest = require('supertest');
const testUtils = require('../../utils');
const localUtils = require('./utils');
const config = require('../../../core/shared/config');
const configUtils = require('../../utils/configUtils');
describe('Content API key authentication', function (... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/pages.test.js | ghost/core/test/e2e-api/content/pages.test.js | const assert = require('assert/strict');
const moment = require('moment');
const testUtils = require('../../utils');
const models = require('../../../core/server/models');
const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyUuid, anyISODateTimeW... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/offers.test.js | ghost/core/test/e2e-api/content/offers.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const testUtils = require('../../utils');
const models = require('../../../core/server/models');
const offerSnapshot = {
id: matchers.anyObjectId,
tier: {
id: matchers.anyObjectId
}
};
describe('Offers Content ... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/search-index.test.js | ghost/core/test/e2e-api/content/search-index.test.js | const assert = require('assert/strict');
const models = require('../../../core/server/models');
const context = require('../../utils/fixtures/context');
const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyISODateTimeWithTZ, anyString} = matchers... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/posts.test.js | ghost/core/test/e2e-api/content/posts.test.js | const assert = require('assert/strict');
const cheerio = require('cheerio');
const sinon = require('sinon');
const config = require('../../../core/shared/config');
const moment = require('moment');
const testUtils = require('../../utils');
const models = require('../../../core/server/models');
const urlUtilsHelper = re... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/authors.test.js | ghost/core/test/e2e-api/content/authors.test.js | const assert = require('assert/strict');
const {agentProvider, fixtureManager, matchers, assertions} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyObjectId, anyNumber} = matchers;
const {cacheInvalidateHeaderNotSet} = assertions;
const localUtils = require('./utils');
const authorMatche... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/tags.test.js | ghost/core/test/e2e-api/content/tags.test.js | const assert = require('assert/strict');
const should = require('should');
const supertest = require('supertest');
const _ = require('lodash');
const url = require('url');
const configUtils = require('../../utils/configUtils');
const config = require('../../../core/shared/config');
const testUtils = require('../../util... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/max-limit-cap.test.js | ghost/core/test/e2e-api/content/max-limit-cap.test.js | const {agentProvider, fixtureManager} = require('../../utils/e2e-framework');
const should = require('should');
const sinon = require('sinon');
const sharedMiddleware = require('../../../core/server/web/shared/middleware');
describe('Content API - Max Limit Cap', function () {
let agent;
let originalMiddleware... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/settings.test.js | ghost/core/test/e2e-api/content/settings.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyEtag, anyContentLength, anyContentVersion, anyUuid, anyString, anyObject} = matchers;
const settingsMatcher = {
version: anyString,
labs: anyObject,
site_uuid: anyUuid
};
describe('Settings Content API', func... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/content/utils.js | ghost/core/test/e2e-api/content/utils.js | const url = require('url');
const testUtils = require('../../utils');
const API_URL = '/ghost/api/content/';
const expectedProperties = {
// API top level
posts: ['posts', 'meta'],
tags: ['tags', 'meta'],
authors: ['authors', 'meta'],
pagination: ['page', 'limit', 'pages', 'total', 'next', 'prev']... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/webmentions/webmentions.test.js | ghost/core/test/e2e-api/webmentions/webmentions.test.js | const {
agentProvider,
fixtureManager,
mockManager,
dbUtils,
configUtils
} = require('../../utils/e2e-framework');
const models = require('../../../core/server/models');
const assert = require('assert/strict');
const urlUtils = require('../../../core/shared/url-utils');
const nock = require('nock');... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/posts-legacy.test.js | ghost/core/test/e2e-api/admin/posts-legacy.test.js | const should = require('should');
const nock = require('nock');
const path = require('path');
const supertest = require('supertest');
const _ = require('lodash');
const moment = require('moment-timezone');
const testUtils = require('../../utils');
const config = require('../../../core/shared/config');
const models = re... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/pages-bulk.test.js | ghost/core/test/e2e-api/admin/pages-bulk.test.js | const {agentProvider, fixtureManager, mockManager} = require('../../utils/e2e-framework');
const models = require('../../../core/server/models');
const assert = require('assert/strict');
const forcePageFilter = (filter) => {
if (filter) {
return `(${filter})+type:page`;
} else {
return 'type:pa... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/themes.test.js | ghost/core/test/e2e-api/admin/themes.test.js | const should = require('should');
const sinon = require('sinon');
const path = require('path');
const fs = require('fs');
const _ = require('lodash');
const supertest = require('supertest');
const nock = require('nock');
const config = require('../../../core/shared/config');
const localUtils = require('./utils');
const... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/settings-files.test.js | ghost/core/test/e2e-api/admin/settings-files.test.js | const FormData = require('form-data');
const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag} = matchers;
describe('Settings File API', function () {
let agent;
before(async function () {
agent = await agentProvider.getAdminAPIAgent()... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/site.test.js | ghost/core/test/e2e-api/admin/site.test.js | const {agentProvider, matchers} = require('../../utils/e2e-framework');
const {anyEtag, stringMatching, anyContentLength, anyContentVersion, anyUuid} = matchers;
describe('Site API', function () {
let agent;
before(async function () {
agent = await agentProvider.getAdminAPIAgent();
});
it('ca... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/automated-emails.test.js | ghost/core/test/e2e-api/admin/automated-emails.test.js | const {agentProvider, fixtureManager, matchers, dbUtils} = require('../../utils/e2e-framework');
const {anyContentVersion, anyObjectId, anyISODateTime, anyErrorId, anyEtag, anyLocationFor} = matchers;
const matchAutomatedEmail = {
id: anyObjectId,
created_at: anyISODateTime,
updated_at: anyISODateTime
};
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/activity-feed.test.js | ghost/core/test/e2e-api/admin/activity-feed.test.js | const {agentProvider, mockManager, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyEtag, anyErrorId, anyObjectId, anyContentLength, anyContentVersion, anyUuid, anyISODate, anyString, anyObject, anyNumber} = matchers;
const assert = require('assert/strict');
const moment = require('moment');... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/slack.test.js | ghost/core/test/e2e-api/admin/slack.test.js | const {agentProvider, fixtureManager, matchers, mockManager} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag} = matchers;
describe('Slack API', function () {
let agent;
before(async function () {
agent = await agentProvider.getAdminAPIAgent();
await fixtureManager.ini... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/slugs.test.js | ghost/core/test/e2e-api/admin/slugs.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag} = matchers;
describe('Slug API', function () {
/** @type {import('../../utils/agents').AdminAPITestAgent} */
let agent;
before(async function () {
agent = await agentProvider.... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/rate-limiting.test.js | ghost/core/test/e2e-api/admin/rate-limiting.test.js | const {
agentProvider,
fixtureManager,
matchers: {
anyContentVersion,
anyEtag
},
dbUtils,
configUtils
} = require('../../utils/e2e-framework');
describe('Sessions API', function () {
let agent;
before(async function () {
agent = await agentProvider.getAdminAPIAg... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/sso.test.js | ghost/core/test/e2e-api/admin/sso.test.js | const {agentProvider, fixtureManager, matchers, configUtils} = require('../../utils/e2e-framework');
const {restore} = require('../../utils/e2e-framework-mock-manager');
const {stringMatching} = matchers;
const sinon = require('sinon');
const adapterManager = require('../../../core/server/services/adapter-manager');
co... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/tinybird.test.js | ghost/core/test/e2e-api/admin/tinybird.test.js | const {agentProvider, fixtureManager} = require('../../utils/e2e-framework');
const assert = require('assert/strict');
const configUtils = require('../../utils/configUtils');
describe('Tinybird API', function () {
let agent;
before(async function () {
agent = await agentProvider.getAdminAPIAgent();
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/explore.test.js | ghost/core/test/e2e-api/admin/explore.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyEtag, anyISODate, anyISODateTime, anyContentLength, anyContentVersion, stringMatching, anyNumber} = matchers;
describe('Explore API', function () {
let agent;
before(async function () {
agent = await agen... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/backup.test.js | ghost/core/test/e2e-api/admin/backup.test.js | const {agentProvider, fixtureManager, matchers, assertions} = require('../../utils/e2e-framework');
const {anyContentLength, anyContentVersion, anyEtag, anyErrorId, stringMatching} = matchers;
const {cacheInvalidateHeaderNotSet} = assertions;
const {exportedBodyLatest} = require('../../utils/fixtures/export/body-genera... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/members.test.js | ghost/core/test/e2e-api/admin/members.test.js | const {agentProvider, mockManager, fixtureManager, matchers, regexes} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyObjectId, anyUuid, anyISODateTime, anyISODate, anyString, anyArray, anyLocationFor, anyContentLength, anyErrorId, anyObject} = matchers;
const {queryStringToken} = regexes;... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/pages-legacy.test.js | ghost/core/test/e2e-api/admin/pages-legacy.test.js | const should = require('should');
const supertest = require('supertest');
const moment = require('moment');
const _ = require('lodash');
const testUtils = require('../../utils');
const config = require('../../../core/shared/config');
const models = require('../../../core/server/models');
const localUtils = require('./u... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/stats.test.js | ghost/core/test/e2e-api/admin/stats.test.js | const {agentProvider, fixtureManager, matchers, mockManager} = require('../../utils/e2e-framework');
const {mockStripe, stripeMocker} = require('../../utils/e2e-framework-mock-manager');
const {anyContentVersion, anyEtag, anyISODate, anyObjectId, anyContentLength} = matchers;
const assert = require('assert/strict');
l... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/links.test.js | ghost/core/test/e2e-api/admin/links.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyObjectId, anyString, anyEtag, anyNumber} = matchers;
const sinon = require('sinon');
const matchLink = {
post_id: anyObjectId,
link: {
link_id: anyObjectId,
from: anyString,
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/config.test.js | ghost/core/test/e2e-api/admin/config.test.js | const assert = require('assert/strict');
const {agentProvider, fixtureManager, matchers, configUtils} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyContentLength, stringMatching} = matchers;
/**
* This is a snapshot test for the happy path of the config API
* It does not test the full... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/emails.test.js | ghost/core/test/e2e-api/admin/emails.test.js | const {agentProvider, fixtureManager, matchers, mockManager} = require('../../utils/e2e-framework');
const {nullable, anyContentVersion, anyEtag, anyObjectId, anyUuid, anyISODateTime, anyString} = matchers;
const assert = require('assert/strict');
const sinon = require('sinon');
const jobManager = require('../../../cor... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/actions.test.js | ghost/core/test/e2e-api/admin/actions.test.js | const should = require('should');
const sinon = require('sinon');
const supertest = require('supertest');
const testUtils = require('../../utils');
const localUtils = require('./utils');
const config = require('../../../core/shared/config');
describe('Actions API', function () {
let request;
before(async func... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/notifications.test.js | ghost/core/test/e2e-api/admin/notifications.test.js | const assert = require('assert/strict');
const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyObjectId, anyEtag, anyLocationFor} = matchers;
const matchNotification = {
id: anyObjectId
};
describe('Notifications API', function () {
let agent;
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/webhooks.test.js | ghost/core/test/e2e-api/admin/webhooks.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyErrorId, anyObjectId, anyISODate, stringMatching, anyContentLength} = matchers;
const webhookMatcher = {
id: anyObjectId,
api_version: stringMatching(/v\d+\.\d+/),
integration_id: a... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/images.test.js | ghost/core/test/e2e-api/admin/images.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const FormData = require('form-data');
const p = require('path');
const fsExtra = require('fs-extra');
const {promises: fs} = require('fs');
const assert = require('assert/strict');
const config = require('../../../core/shared/confi... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/newsletters.test.js | ghost/core/test/e2e-api/admin/newsletters.test.js | const assert = require('assert/strict');
const sinon = require('sinon');
const {agentProvider, mockManager, fixtureManager, configUtils, dbUtils, matchers, regexes} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyObjectId, anyUuid, anyErrorId, anyISODateTime, anyLocationFor, anyNumber} = m... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/users.test.js | ghost/core/test/e2e-api/admin/users.test.js | const assert = require('assert/strict');
const config = require('../../../core/shared/config');
const models = require('../../../core/server/models');
const db = require('../../../core/server/data/db');
const {agentProvider, fixtureManager, matchers, assertions} = require('../../utils/e2e-framework');
const {anyContent... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/mentions.test.js | ghost/core/test/e2e-api/admin/mentions.test.js | const {agentProvider, fixtureManager, mockManager, matchers} = require('../../utils/e2e-framework');
const {anyObjectId, anyISODateTime, anyString} = matchers;
const matchMentionShallowIncludes = {
id: anyObjectId,
source: anyString,
target: anyString,
timestamp: anyISODateTime,
source_title: anySt... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/email-preview-rate-limiter.test.js | ghost/core/test/e2e-api/admin/email-preview-rate-limiter.test.js | // Decided to have this test separately from the other email preview tests since the rate limiter would interfere with the other tests
const {agentProvider, fixtureManager, mockManager, configUtils, resetRateLimits, dbUtils} = require('../../utils/e2e-framework');
const sinon = require('sinon');
const DomainEvents = r... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/tiers.test.js | ghost/core/test/e2e-api/admin/tiers.test.js | const assert = require('assert/strict');
const {
agentProvider,
fixtureManager,
mockManager,
matchers
} = require('../../utils/e2e-framework');
const models = require('../../../core/server/models/index');
const {anyContentVersion, anyEtag} = matchers;
describe('Tiers API', function () {
let agent;
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/files.test.js | ghost/core/test/e2e-api/admin/files.test.js | const path = require('path');
const fs = require('fs-extra');
const should = require('should');
const supertest = require('supertest');
const localUtils = require('./utils');
const config = require('../../../core/shared/config');
describe('Files API', function () {
const files = [];
let request;
before(as... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/key-authentication.test.js | ghost/core/test/e2e-api/admin/key-authentication.test.js | const should = require('should');
const supertest = require('supertest');
const testUtils = require('../../utils');
const config = require('../../../core/shared/config');
const localUtils = require('./utils');
const configUtils = require('../../utils/configUtils');
const sinon = require('sinon');
const logging = requir... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/redirects.test.js | ghost/core/test/e2e-api/admin/redirects.test.js | const should = require('should');
const supertest = require('supertest');
const fs = require('fs-extra');
const path = require('path');
const localUtils = require('./utils');
const config = require('../../../core/shared/config');
describe('Redirects API', function () {
let request;
before(async function () {
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/recommendations.test.js | ghost/core/test/e2e-api/admin/recommendations.test.js | const {agentProvider, fixtureManager, mockManager, matchers} = require('../../utils/e2e-framework');
const {anyObjectId, anyErrorId, anyISODateTime, anyContentVersion, anyLocationFor, anyEtag} = matchers;
const assert = require('assert/strict');
const recommendationsService = require('../../../core/server/services/reco... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/storage-adapter-switching.test.js | ghost/core/test/e2e-api/admin/storage-adapter-switching.test.js | const should = require('should');
const sinon = require('sinon');
const {agentProvider, fixtureManager} = require('../../utils/e2e-framework');
const config = require('../../../core/shared/config');
const urlUtilsHelper = require('../../utils/urlUtils');
const models = require('../../../core/server/models');
describe(... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/session.test.js | ghost/core/test/e2e-api/admin/session.test.js | const {agentProvider, fixtureManager, matchers, configUtils} = require('../../utils/e2e-framework');
const {mockMail, assert, restore} = require('../../utils/e2e-framework-mock-manager');
const {anyContentVersion, anyEtag, stringMatching, anyUuid} = matchers;
describe('Sessions API', function () {
let agent;
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/media.test.js | ghost/core/test/e2e-api/admin/media.test.js | const path = require('path');
const fs = require('fs-extra');
const should = require('should');
const supertest = require('supertest');
const sinon = require('sinon');
const localUtils = require('./utils');
const config = require('../../../core/shared/config');
const logging = require('@tryghost/logging');
describe('M... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/members-stripe-connect.test.js | ghost/core/test/e2e-api/admin/members-stripe-connect.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, stringMatching} = matchers;
describe('Members Stripe Connect API', function () {
let agent;
before(async function () {
agent = await agentProvider.getAdminAPIAgent();
await fixture... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/comments.test.js | ghost/core/test/e2e-api/admin/comments.test.js | const assert = require('assert/strict');
const {
agentProvider,
fixtureManager,
mockManager,
dbUtils,
matchers
} = require('../../utils/e2e-framework');
const {anyEtag, anyObjectId, anyISODateTime, anyUuid, anyNumber, anyBoolean, anyString, nullable} = matchers;
const models = require('../../../core... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/pages.test.js | ghost/core/test/e2e-api/admin/pages.test.js | const models = require('../../../core/server/models');
const {agentProvider, fixtureManager, mockManager, matchers} = require('../../utils/e2e-framework');
const {anyArray, anyBoolean, anyContentVersion, anyEtag, anyLocationFor, anyObject, anyObjectId, anyISODateTime, anyString, anyUuid, stringMatching} = matchers;
co... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/authentication.test.js | ghost/core/test/e2e-api/admin/authentication.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyErrorId} = matchers;
describe('Authentication API', function () {
let agent;
before(async function () {
agent = await agentProvider.getAdminAPIAgent();
await fixtureManager.init('users');
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/members-importer.test.js | ghost/core/test/e2e-api/admin/members-importer.test.js | const path = require('path');
const assert = require('assert/strict');
const should = require('should');
const supertest = require('supertest');
const testUtils = require('../../utils');
const localUtils = require('./utils');
const config = require('../../../core/shared/config');
const {mockManager} = require('../../u... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/offers.test.js | ghost/core/test/e2e-api/admin/offers.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyObjectId, anyLocationFor, anyErrorId, anyISODateTime} = matchers;
const should = require('should');
const models = require('../../../core/server/models');
const sinon = require('sinon');
const l... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/db.test.js | ghost/core/test/e2e-api/admin/db.test.js | const {agentProvider, fixtureManager, matchers, assertions, mockManager} = require('../../utils/e2e-framework');
const {anyContentVersion, anyErrorId, anyEtag, anyContentLength, stringMatching} = matchers;
const {cacheInvalidateHeaderNotSet, cacheInvalidateHeaderSetToWildcard} = assertions;
const {exportedBodyLatest} =... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/oembed.test.js | ghost/core/test/e2e-api/admin/oembed.test.js | const nock = require('nock');
const sinon = require('sinon');
const should = require('should');
const supertest = require('supertest');
const testUtils = require('../../utils/index');
const config = require('../../../core/shared/config/index');
const localUtils = require('./utils');
const {mockManager} = require('../..... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/search-index.test.js | ghost/core/test/e2e-api/admin/search-index.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyISODateTime, anyString} = matchers;
const assert = require('node:assert');
describe('Search Index API', function () {
let agent;
before(async function () {
agent = await agentP... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/members-edit-subscriptions.test.js | ghost/core/test/e2e-api/admin/members-edit-subscriptions.test.js | const {agentProvider, mockManager, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyObjectId, anyUuid, anyISODateTime, anyString, anyArray} = matchers;
const testUtils = require('../../utils');
const assert = require('assert/strict');
const models = require('../../... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/integrations.test.js | ghost/core/test/e2e-api/admin/integrations.test.js | const _ = require('lodash');
const should = require('should');
const supertest = require('supertest');
const config = require('../../../core/shared/config');
const testUtils = require('../../utils');
const localUtils = require('./utils');
const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framew... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/members-newsletters.test.js | ghost/core/test/e2e-api/admin/members-newsletters.test.js | const {agentProvider, mockManager, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyObjectId, anyUuid, anyISODateTime, anyArray} = matchers;
const settingsHelpers = require('../../../core/server/services/settings-helpers');
const sinon = require('sinon');
const me... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/email-previews.test.js | ghost/core/test/e2e-api/admin/email-previews.test.js | const {agentProvider, fixtureManager, matchers, mockManager} = require('../../utils/e2e-framework');
const {anyEtag, anyErrorId, anyContentVersion, anyString} = matchers;
const assert = require('assert/strict');
const config = require('../../../core/shared/config');
const sinon = require('sinon');
const escapeRegExp = ... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/invites.test.js | ghost/core/test/e2e-api/admin/invites.test.js | const should = require('should');
const supertest = require('supertest');
const sinon = require('sinon');
const testUtils = require('../../utils');
const config = require('../../../core/shared/config');
const mailService = require('../../../core/server/services/mail');
const localUtils = require('./utils');
describe('... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/posts.test.js | ghost/core/test/e2e-api/admin/posts.test.js | const should = require('should');
const sinon = require('sinon');
const {agentProvider, fixtureManager, mockManager, matchers} = require('../../utils/e2e-framework');
const {anyArray, anyContentVersion, anyEtag, anyErrorId, anyLocationFor, anyObject, anyObjectId, anyISODateTime, anyString, anyStringNumber, anyUuid, str... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/members-exporter.test.js | ghost/core/test/e2e-api/admin/members-exporter.test.js | const {agentProvider, mockManager, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyString} = matchers;
const crypto = require('crypto');
const should = require('should');
const Papa = require('papaparse');
const models = require('../../../core/server/models');
const momen... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/custom-theme-settings.test.js | ghost/core/test/e2e-api/admin/custom-theme-settings.test.js | const sinon = require('sinon');
const logging = require('@tryghost/logging');
const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyObjectId, anyUuid} = matchers;
describe('Custom Theme Settings API', function () {
/** @type {import('../../uti... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/snippets.test.js | ghost/core/test/e2e-api/admin/snippets.test.js | require('should');
const sinon = require('sinon');
const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyLocationFor, anyObjectId, anyISODateTime, anyErrorId} = matchers;
const config = require('../../../core/shared/config');
const urlUtilsHelper =... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/roles.test.js | ghost/core/test/e2e-api/admin/roles.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyEtag, anyISODateTime, anyObjectId} = matchers;
const rolesObjectMatcher = {
id: anyObjectId,
created_at: anyISODateTime,
updated_at: anyISODateTime
};
describe('Roles API', function () {
... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/tags.test.js | ghost/core/test/e2e-api/admin/tags.test.js | const should = require('should');
const sinon = require('sinon');
const supertest = require('supertest');
const testUtils = require('../../utils');
const config = require('../../../core/shared/config');
const localUtils = require('./utils');
const urlUtilsHelper = require('../../utils/urlUtils');
describe('Tag API', f... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/labels.test.js | ghost/core/test/e2e-api/admin/labels.test.js | const logging = require('@tryghost/logging');
const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyContentVersion, anyObjectId, anyISODateTime, anyErrorId, anyEtag, anyLocationFor} = matchers;
const sinon = require('sinon');
const matchLabel = {
id: anyObjectId,
cre... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/api-tokens.test.js | ghost/core/test/e2e-api/admin/api-tokens.test.js | const {agentProvider, fixtureManager} = require('../../utils/e2e-framework');
const assert = require('assert/strict');
describe('Admin API', function () {
let agent;
before(async function () {
agent = await agentProvider.getAdminAPIAgent();
await fixtureManager.init('users');
});
func... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/max-limit-cap.test.js | ghost/core/test/e2e-api/admin/max-limit-cap.test.js | const {agentProvider, fixtureManager} = require('../../utils/e2e-framework');
const should = require('should');
const sinon = require('sinon');
const db = require('../../../core/server/data/db');
const ObjectId = require('bson-objectid').default;
const maxLimitCap = require('../../../core/server/web/shared/middleware/m... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/settings.test.js | ghost/core/test/e2e-api/admin/settings.test.js | const assert = require('assert/strict');
const sinon = require('sinon');
const logging = require('@tryghost/logging');
const SingleUseTokenProvider = require('../../../core/server/services/members/SingleUseTokenProvider');
const settingsCache = require('../../../core/shared/settings-cache');
const {agentProvider, fixtu... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/utils.js | ghost/core/test/e2e-api/admin/utils.js | const url = require('url');
const _ = require('lodash');
const testUtils = require('../../utils');
// NOTE: the dependance on the schema here is wrong! It is a design flaw which is causing problems for API maintenance and compatibility
// whenever you need to modify any of the below property lists using schema -... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/admin/posts-bulk.test.js | ghost/core/test/e2e-api/admin/posts-bulk.test.js | const should = require('should');
const DomainEvents = require('@tryghost/domain-events');
const {mobiledocToLexical} = require('@tryghost/kg-converters');
const {agentProvider, fixtureManager, mockManager} = require('../../utils/e2e-framework');
const models = require('../../../core/server/models');
const assert = req... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/members-comments/comments.test.js | ghost/core/test/e2e-api/members-comments/comments.test.js | const assert = require('assert/strict');
const {agentProvider, mockManager, fixtureManager, matchers, configUtils, dbUtils} = require('../../utils/e2e-framework');
const {nullable, anyEtag, anyObjectId, anyLocationFor, anyISODateTime, anyErrorId, anyUuid, anyNumber, anyBoolean, stringMatching} = matchers;
const should ... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/members-comments/max-limit-cap.test.js | ghost/core/test/e2e-api/members-comments/max-limit-cap.test.js | const {agentProvider, fixtureManager} = require('../../utils/e2e-framework');
const should = require('should');
const sinon = require('sinon');
const settingsCache = require('../../../core/shared/settings-cache');
const sharedMiddleware = require('../../../core/server/web/shared/middleware');
describe('Comments API - ... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/members/create-stripe-checkout-session.test.js | ghost/core/test/e2e-api/members/create-stripe-checkout-session.test.js | const querystring = require('querystring');
const {agentProvider, mockManager, fixtureManager, matchers} = require('../../utils/e2e-framework');
const nock = require('nock');
const should = require('should');
const models = require('../../../core/server/models');
const urlService = require('../../../core/server/service... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/members/feedback.test.js | ghost/core/test/e2e-api/members/feedback.test.js | const assert = require('assert/strict');
const {agentProvider, mockManager, fixtureManager, matchers, configUtils} = require('../../utils/e2e-framework');
const {anyEtag, anyObjectId, anyLocationFor, anyErrorId} = matchers;
const models = require('../../../core/server/models');
const sinon = require('sinon');
const set... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/members/site.test.js | ghost/core/test/e2e-api/members/site.test.js | const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {anyEtag, stringMatching, anyContentLength, anyUuid} = matchers;
const assert = require('assert/strict');
const models = require('../../../core/server/models');
const siteMatcherObject = {
site: {
version: stringM... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/members/announcement.test.js | ghost/core/test/e2e-api/members/announcement.test.js | const {agentProvider, mockManager, fixtureManager, matchers, configUtils} = require('../../utils/e2e-framework');
const {anyEtag} = matchers;
const settingsCache = require('../../../core/shared/settings-cache');
describe('Announcement', function () {
let membersAgent;
before(async function () {
member... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | false |
TryGhost/Ghost | https://github.com/TryGhost/Ghost/blob/31ecb69a147e71743e74014b4e04ccce09ab8c1a/ghost/core/test/e2e-api/members/webhooks.test.js | ghost/core/test/e2e-api/members/webhooks.test.js | const crypto = require('crypto');
const assert = require('assert/strict');
const nock = require('nock');
const should = require('should');
const stripe = require('stripe');
const {Product} = require('../../../core/server/models/product');
const {agentProvider, mockManager, fixtureManager, matchers} = require('../../uti... | javascript | MIT | 31ecb69a147e71743e74014b4e04ccce09ab8c1a | 2026-01-04T14:57:14.657301Z | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.