mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-22 19:32:54 +03:00
Move tests from core to root (#11700)
- move all test files from core/test to test/ - updated all imports and other references - all code inside of core/ is then application code - tests are correctly at the root level - consistent with other repos/projects Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
This commit is contained in:
parent
4c554ae131
commit
7f1d3ebc07
6
.gitignore
vendored
6
.gitignore
vendored
@ -76,7 +76,7 @@ b-cov
|
||||
*.out
|
||||
*.gz
|
||||
|
||||
!core/test/utils/fixtures/**/*.csv
|
||||
!test/utils/fixtures/**/*.csv
|
||||
|
||||
results
|
||||
|
||||
@ -114,8 +114,8 @@ projectFilesBackup
|
||||
CHANGELOG.md
|
||||
|
||||
# Test generated files
|
||||
/core/test/functional/*.png
|
||||
/core/test/coverage
|
||||
test/functional/*.png
|
||||
test/coverage
|
||||
|
||||
# ignore all custom json files for config
|
||||
/config.*.json
|
||||
|
@ -35,7 +35,7 @@ core/built/**/*.map
|
||||
core/built/**/test-*
|
||||
core/built/**/tests-*
|
||||
core/client/**
|
||||
core/test/**
|
||||
test/**
|
||||
CONTRIBUTING.md
|
||||
content/themes/casper/SECURITY.md
|
||||
SECURITY.md
|
||||
|
18
Gruntfile.js
18
Gruntfile.js
@ -123,20 +123,20 @@ const configureGrunt = function (grunt) {
|
||||
|
||||
unit: {
|
||||
src: [
|
||||
'core/test/unit/**/*_spec.js'
|
||||
'test/unit/**/*_spec.js'
|
||||
]
|
||||
},
|
||||
|
||||
acceptance: {
|
||||
src: [
|
||||
'core/test/api-acceptance/**/*_spec.js',
|
||||
'core/test/frontend-acceptance/**/*_spec.js'
|
||||
'test/api-acceptance/**/*_spec.js',
|
||||
'test/frontend-acceptance/**/*_spec.js'
|
||||
]
|
||||
},
|
||||
|
||||
regression: {
|
||||
src: [
|
||||
'core/test/regression/**/*_spec.js'
|
||||
'test/regression/**/*_spec.js'
|
||||
]
|
||||
},
|
||||
|
||||
@ -383,17 +383,17 @@ const configureGrunt = function (grunt) {
|
||||
//
|
||||
// `grunt test:unit/apps_spec.js` will run just the tests inside the apps_spec.js file
|
||||
//
|
||||
// It works for any path relative to the core/test folder. It will also run all the tests in a single directory
|
||||
// You can also run a test with grunt test:core/test/unit/... to get bash autocompletion
|
||||
// It works for any path relative to the /test/ folder. It will also run all the tests in a single directory
|
||||
// You can also run a test with grunt test:test/unit/... to get bash autocompletion
|
||||
//
|
||||
// `grunt test:regression/api` - runs the api regression tests
|
||||
grunt.registerTask('test', 'Run a particular spec file from the core/test directory e.g. `grunt test:unit/apps_spec.js`', function (test) {
|
||||
grunt.registerTask('test', 'Run a particular spec file from the /test/ directory e.g. `grunt test:unit/apps_spec.js`', function (test) {
|
||||
if (!test) {
|
||||
grunt.fail.fatal('No test provided. `grunt test` expects a filename. e.g.: `grunt test:unit/apps_spec.js`. Did you mean `npm test` or `grunt validate`?');
|
||||
}
|
||||
|
||||
if (!test.match(/core\/test/) && !test.match(/core\/server/)) {
|
||||
test = 'core/test/' + test;
|
||||
if (!test.match(/test\//) && !test.match(/core\/server/)) {
|
||||
test = 'test/' + test;
|
||||
}
|
||||
|
||||
// CASE: execute folder
|
||||
|
@ -1 +0,0 @@
|
||||
core/test/coverage/**
|
@ -29,7 +29,7 @@
|
||||
"setup": "yarn install && knex-migrator init && grunt symlink && grunt init || true",
|
||||
"lint:server": "eslint --ignore-path .eslintignore 'core/server/**/*.js' 'core/*.js' '*.js'",
|
||||
"lint:frontend": "eslint --ignore-path .eslintignore 'core/frontend/**/*.js'",
|
||||
"lint:test": "eslint -c core/test/.eslintrc.json --ignore-path core/test/.eslintignore 'core/test/**/*.js'",
|
||||
"lint:test": "eslint -c test/.eslintrc.json --ignore-path test/.eslintignore 'test/**/*.js'",
|
||||
"lint": "yarn lint:server && yarn lint:frontend && yarn lint:test",
|
||||
"posttest": "yarn lint",
|
||||
"fixmodulenotdefined": "yarn cache clean && cd core/client && rm -rf node_modules tmp dist && yarn && cd ../../"
|
||||
|
@ -15,7 +15,7 @@
|
||||
"validator",
|
||||
"simple-dom"
|
||||
],
|
||||
"ignorePaths": ["core/test"],
|
||||
"ignorePaths": ["test"],
|
||||
"packageRules": [
|
||||
{
|
||||
"packagePatterns": [ "metascraper" ],
|
||||
|
1
test/.eslintignore
Normal file
1
test/.eslintignore
Normal file
@ -0,0 +1 @@
|
||||
test/coverage/**
|
@ -3,7 +3,7 @@ const Promise = require('bluebird');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const ghost = testUtils.startGhost;
|
||||
|
||||
let request;
|
@ -2,7 +2,7 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const ghost = testUtils.startGhost;
|
||||
|
||||
let request;
|
@ -2,8 +2,8 @@ const path = require('path');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const config = require('../../../server/config');
|
||||
const common = require('../../../server/lib/common');
|
||||
const config = require('../../../core/server/config');
|
||||
const common = require('../../../core/server/lib/common');
|
||||
const testUtils = require('../../utils');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const testUtils = require('../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -4,7 +4,7 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -1,7 +1,7 @@
|
||||
const _ = require('lodash');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const testUtils = require('../../utils');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -2,8 +2,8 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const mailService = require('../../../server/services/mail');
|
||||
const config = require('../../../core/server/config');
|
||||
const mailService = require('../../../core/server/services/mail');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -2,7 +2,7 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -2,8 +2,8 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const mailService = require('../../../server/services/mail');
|
||||
const config = require('../../../core/server/config');
|
||||
const mailService = require('../../../core/server/services/mail');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -2,7 +2,7 @@ const nock = require('nock');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../utils/index');
|
||||
const config = require('../../../server/config/index');
|
||||
const config = require('../../../core/server/config/index');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -2,8 +2,8 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const models = require('../../../server/models');
|
||||
const config = require('../../../core/server/config');
|
||||
const models = require('../../../core/server/models');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -4,8 +4,8 @@ const _ = require('lodash');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const moment = require('moment-timezone');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const models = require('../../../server/models');
|
||||
const config = require('../../../core/server/config');
|
||||
const models = require('../../../core/server/models');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -1,6 +1,6 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const testUtils = require('../../utils');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -3,7 +3,7 @@ const _ = require('lodash');
|
||||
const supertest = require('supertest');
|
||||
const os = require('os');
|
||||
const fs = require('fs-extra');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const testUtils = require('../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
@ -1,7 +1,7 @@
|
||||
var should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
testUtils = require('../../utils'),
|
||||
config = require('../../../server/config'),
|
||||
config = require('../../../core/server/config'),
|
||||
localUtils = require('./utils'),
|
||||
|
||||
ghost = testUtils.startGhost,
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -4,7 +4,7 @@ const fs = require('fs');
|
||||
const _ = require('lodash');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -3,9 +3,9 @@ const _ = require('lodash');
|
||||
const supertest = require('supertest');
|
||||
const Promise = require('bluebird');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const db = require('../../../server/data/db');
|
||||
const models = require('../../../server/models');
|
||||
const config = require('../../../core/server/config');
|
||||
const db = require('../../../core/server/data/db');
|
||||
const models = require('../../../core/server/models');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -1,7 +1,7 @@
|
||||
const url = require('url');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../utils');
|
||||
const schema = require('../../../server/data/schema').tables;
|
||||
const schema = require('../../../core/server/data/schema').tables;
|
||||
const API_URL = '/ghost/api/canary/admin/';
|
||||
|
||||
const expectedProperties = {
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -3,8 +3,8 @@ const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const url = require('url');
|
||||
const configUtils = require('../../utils/configUtils');
|
||||
const config = require('../../../server/config');
|
||||
const models = require('../../../server/models');
|
||||
const config = require('../../../core/server/config');
|
||||
const models = require('../../../core/server/models');
|
||||
const testUtils = require('../../utils');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -3,7 +3,7 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../utils');
|
||||
const configUtils = require('../../utils/configUtils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -6,7 +6,7 @@ const cheerio = require('cheerio');
|
||||
const moment = require('moment');
|
||||
const testUtils = require('../../utils');
|
||||
const configUtils = require('../../utils/configUtils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
@ -2,12 +2,12 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
// Values to test against
|
||||
const publicSettings = require('../../../server/services/settings/public');
|
||||
const defaultSettings = require('../../../server/data/schema').defaultSettings.blog;
|
||||
const publicSettings = require('../../../core/server/services/settings/public');
|
||||
const defaultSettings = require('../../../core/server/data/schema').defaultSettings.blog;
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const url = require('url');
|
||||
const configUtils = require('../../utils/configUtils');
|
||||
const config = require('../../../server/config');
|
||||
const config = require('../../../core/server/config');
|
||||
const testUtils = require('../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
@ -1,7 +1,7 @@
|
||||
const url = require('url');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../utils');
|
||||
const schema = require('../../../server/data/schema').tables;
|
||||
const schema = require('../../../core/server/data/schema').tables;
|
||||
const API_URL = '/ghost/api/canary/content/';
|
||||
|
||||
const expectedProperties = {
|
@ -13,8 +13,8 @@ var should = require('should'),
|
||||
_ = require('lodash'),
|
||||
testUtils = require('../utils'),
|
||||
configUtils = require('../utils/configUtils'),
|
||||
config = require('../../server/config'),
|
||||
settingsCache = require('../../server/services/settings/cache'),
|
||||
config = require('../../core/server/config'),
|
||||
settingsCache = require('../../core/server/services/settings/cache'),
|
||||
origCache = _.cloneDeep(settingsCache),
|
||||
ghost = testUtils.startGhost,
|
||||
request;
|
@ -9,8 +9,8 @@ var should = require('should'),
|
||||
configUtils = require('../../utils/configUtils'),
|
||||
urlUtils = require('../../utils/urlUtils'),
|
||||
ghost = testUtils.startGhost,
|
||||
common = require('../../../server/lib/common/index'),
|
||||
config = require('../../../server/config/index'),
|
||||
common = require('../../../core/server/lib/common/index'),
|
||||
config = require('../../../core/server/config/index'),
|
||||
request;
|
||||
|
||||
common.i18n.init();
|
@ -3,11 +3,11 @@ const sinon = require('sinon');
|
||||
const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils/index');
|
||||
const models = require('../../../../../server/models/index');
|
||||
const security = require('../../../../../server/lib/security/index');
|
||||
const settingsCache = require('../../../../../server/services/settings/cache');
|
||||
const config = require('../../../../../server/config/index');
|
||||
const mailService = require('../../../../../server/services/mail/index');
|
||||
const models = require('../../../../../core/server/models/index');
|
||||
const security = require('../../../../../core/server/lib/security/index');
|
||||
const settingsCache = require('../../../../../core/server/services/settings/cache');
|
||||
const config = require('../../../../../core/server/config/index');
|
||||
const mailService = require('../../../../../core/server/services/mail/index');
|
||||
|
||||
let ghost = testUtils.startGhost;
|
||||
let request;
|
@ -6,9 +6,9 @@ const uuid = require('uuid');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const config = require('../../../../../server/config');
|
||||
const models = require('../../../../../server/models');
|
||||
const common = require('../../../../../server/lib/common');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const models = require('../../../../../core/server/models');
|
||||
const common = require('../../../../../core/server/lib/common');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -4,7 +4,7 @@ const jwt = require('jsonwebtoken');
|
||||
const jwksClient = require('jwks-rsa');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -4,7 +4,7 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -4,8 +4,8 @@ const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const labs = require('../../../../../server/services/labs');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const labs = require('../../../../../core/server/services/labs');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -4,8 +4,8 @@ const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const labs = require('../../../../../server/services/labs');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const labs = require('../../../../../core/server/services/labs');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -3,8 +3,8 @@ const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const moment = require('moment-timezone');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const models = require('../../../../../server/models');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const models = require('../../../../../core/server/models');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -6,7 +6,7 @@ const path = require('path');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -4,9 +4,9 @@ const supertest = require('supertest');
|
||||
const Promise = require('bluebird');
|
||||
const sinon = require('sinon');
|
||||
const moment = require('moment-timezone');
|
||||
const SchedulingDefault = require('../../../../../server/adapters/scheduling/SchedulingDefault');
|
||||
const models = require('../../../../../server/models/index');
|
||||
const config = require('../../../../../server/config/index');
|
||||
const SchedulingDefault = require('../../../../../core/server/adapters/scheduling/SchedulingDefault');
|
||||
const models = require('../../../../../core/server/models/index');
|
||||
const config = require('../../../../../core/server/config/index');
|
||||
const testUtils = require('../../../../utils/index');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -1,6 +1,6 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
@ -3,8 +3,8 @@ const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const common = require('../../../../../server/lib/common');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const common = require('../../../../../core/server/lib/common');
|
||||
const ghost = testUtils.startGhost;
|
||||
|
||||
let request;
|
@ -2,7 +2,7 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -1,7 +1,7 @@
|
||||
const url = require('url');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../../../utils');
|
||||
const schema = require('../../../../../server/data/schema').tables;
|
||||
const schema = require('../../../../../core/server/data/schema').tables;
|
||||
const API_URL = '/ghost/api/canary/admin/';
|
||||
|
||||
const expectedProperties = {
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -3,12 +3,12 @@ const sinon = require('sinon');
|
||||
const moment = require('moment');
|
||||
const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const labs = require('../../../../../server/services/labs');
|
||||
const labs = require('../../../../../core/server/services/labs');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const urlUtils = require('../../../../utils/urlUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -1,7 +1,7 @@
|
||||
const url = require('url');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../../../utils');
|
||||
const schema = require('../../../../../server/data/schema').tables;
|
||||
const schema = require('../../../../../core/server/data/schema').tables;
|
||||
const API_URL = '/ghost/api/canary/content/';
|
||||
|
||||
const expectedProperties = {
|
@ -3,11 +3,11 @@ const sinon = require('sinon');
|
||||
const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils/index');
|
||||
const models = require('../../../../../server/models/index');
|
||||
const security = require('../../../../../server/lib/security/index');
|
||||
const settingsCache = require('../../../../../server/services/settings/cache');
|
||||
const config = require('../../../../../server/config/index');
|
||||
const mailService = require('../../../../../server/services/mail/index');
|
||||
const models = require('../../../../../core/server/models/index');
|
||||
const security = require('../../../../../core/server/lib/security/index');
|
||||
const settingsCache = require('../../../../../core/server/services/settings/cache');
|
||||
const config = require('../../../../../core/server/config/index');
|
||||
const mailService = require('../../../../../core/server/services/mail/index');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
|
||||
let ghost = testUtils.startGhost;
|
@ -6,9 +6,9 @@ const uuid = require('uuid');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const config = require('../../../../../server/config');
|
||||
const models = require('../../../../../server/models');
|
||||
const common = require('../../../../../server/lib/common');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const models = require('../../../../../core/server/models');
|
||||
const common = require('../../../../../core/server/lib/common');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -4,7 +4,7 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -3,8 +3,8 @@ const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const moment = require('moment-timezone');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const models = require('../../../../../server/models');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const models = require('../../../../../core/server/models');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -6,7 +6,7 @@ const path = require('path');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -4,9 +4,9 @@ const supertest = require('supertest');
|
||||
const Promise = require('bluebird');
|
||||
const sinon = require('sinon');
|
||||
const moment = require('moment-timezone');
|
||||
const SchedulingDefault = require('../../../../../server/adapters/scheduling/SchedulingDefault');
|
||||
const models = require('../../../../../server/models/index');
|
||||
const config = require('../../../../../server/config/index');
|
||||
const SchedulingDefault = require('../../../../../core/server/adapters/scheduling/SchedulingDefault');
|
||||
const models = require('../../../../../core/server/models/index');
|
||||
const config = require('../../../../../core/server/config/index');
|
||||
const testUtils = require('../../../../utils/index');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -1,6 +1,6 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
@ -3,8 +3,8 @@ const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const common = require('../../../../../server/lib/common');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const common = require('../../../../../core/server/lib/common');
|
||||
const ghost = testUtils.startGhost;
|
||||
|
||||
let request;
|
@ -2,7 +2,7 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -1,7 +1,7 @@
|
||||
const url = require('url');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../../../utils');
|
||||
const schema = require('../../../../../server/data/schema').tables;
|
||||
const schema = require('../../../../../core/server/data/schema').tables;
|
||||
const API_URL = '/ghost/api/v2/admin/';
|
||||
|
||||
const expectedProperties = {
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -4,7 +4,7 @@ const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -5,12 +5,12 @@ const moment = require('moment');
|
||||
const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const cheerio = require('cheerio');
|
||||
const labs = require('../../../../../server/services/labs');
|
||||
const labs = require('../../../../../core/server/services/labs');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const urlUtils = require('../../../../utils/urlUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -1,7 +1,7 @@
|
||||
const url = require('url');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../../../utils');
|
||||
const schema = require('../../../../../server/data/schema').tables;
|
||||
const schema = require('../../../../../core/server/data/schema').tables;
|
||||
const API_URL = '/ghost/api/v2/content/';
|
||||
|
||||
const expectedProperties = {
|
@ -3,11 +3,11 @@ const sinon = require('sinon');
|
||||
const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils/index');
|
||||
const models = require('../../../../../server/models/index');
|
||||
const security = require('../../../../../server/lib/security/index');
|
||||
const settingsCache = require('../../../../../server/services/settings/cache');
|
||||
const config = require('../../../../../server/config/index');
|
||||
const mailService = require('../../../../../server/services/mail/index');
|
||||
const models = require('../../../../../core/server/models/index');
|
||||
const security = require('../../../../../core/server/lib/security/index');
|
||||
const settingsCache = require('../../../../../core/server/services/settings/cache');
|
||||
const config = require('../../../../../core/server/config/index');
|
||||
const mailService = require('../../../../../core/server/services/mail/index');
|
||||
|
||||
let ghost = testUtils.startGhost;
|
||||
let request;
|
@ -6,9 +6,9 @@ const uuid = require('uuid');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const config = require('../../../../../server/config');
|
||||
const models = require('../../../../../server/models');
|
||||
const common = require('../../../../../server/lib/common');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const models = require('../../../../../core/server/models');
|
||||
const common = require('../../../../../core/server/lib/common');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -4,7 +4,7 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -3,8 +3,8 @@ const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const moment = require('moment-timezone');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const models = require('../../../../../server/models');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const models = require('../../../../../core/server/models');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -6,7 +6,7 @@ const path = require('path');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -4,9 +4,9 @@ const supertest = require('supertest');
|
||||
const Promise = require('bluebird');
|
||||
const sinon = require('sinon');
|
||||
const moment = require('moment-timezone');
|
||||
const SchedulingDefault = require('../../../../../server/adapters/scheduling/SchedulingDefault');
|
||||
const models = require('../../../../../server/models/index');
|
||||
const config = require('../../../../../server/config/index');
|
||||
const SchedulingDefault = require('../../../../../core/server/adapters/scheduling/SchedulingDefault');
|
||||
const models = require('../../../../../core/server/models/index');
|
||||
const config = require('../../../../../core/server/config/index');
|
||||
const testUtils = require('../../../../utils/index');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -1,6 +1,6 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
@ -3,8 +3,8 @@ const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const common = require('../../../../../server/lib/common');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const common = require('../../../../../core/server/lib/common');
|
||||
const ghost = testUtils.startGhost;
|
||||
|
||||
let request;
|
@ -2,7 +2,7 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
const localUtils = require('./utils');
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -1,7 +1,7 @@
|
||||
const url = require('url');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../../../utils');
|
||||
const schema = require('../../../../../server/data/schema').tables;
|
||||
const schema = require('../../../../../core/server/data/schema').tables;
|
||||
const API_URL = '/ghost/api/v3/admin/';
|
||||
|
||||
const expectedProperties = {
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -3,12 +3,12 @@ const sinon = require('sinon');
|
||||
const moment = require('moment');
|
||||
const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const labs = require('../../../../../server/services/labs');
|
||||
const labs = require('../../../../../core/server/services/labs');
|
||||
const testUtils = require('../../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const urlUtils = require('../../../../utils/urlUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -3,7 +3,7 @@ const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../server/config');
|
||||
const config = require('../../../../../core/server/config');
|
||||
|
||||
const ghost = testUtils.startGhost;
|
||||
let request;
|
@ -1,7 +1,7 @@
|
||||
const url = require('url');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../../../utils');
|
||||
const schema = require('../../../../../server/data/schema').tables;
|
||||
const schema = require('../../../../../core/server/data/schema').tables;
|
||||
const API_URL = '/ghost/api/v3/content/';
|
||||
|
||||
const expectedProperties = {
|
@ -4,8 +4,8 @@ var should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
||||
// Stuff we are testing
|
||||
exporter = require('../../../server/data/exporter'),
|
||||
ghostVersion = require('../../../server/lib/ghost-version');
|
||||
exporter = require('../../../core/server/data/exporter'),
|
||||
ghostVersion = require('../../../core/server/lib/ghost-version');
|
||||
|
||||
describe('Exporter', function () {
|
||||
before(testUtils.teardownDb);
|
@ -9,9 +9,9 @@ var should = require('should'),
|
||||
validator = require('validator'),
|
||||
|
||||
// Stuff we are testing
|
||||
db = require('../../../server/data/db'),
|
||||
models = require('../../../server/models'),
|
||||
importer = require('../../../server/data/importer'),
|
||||
db = require('../../../core/server/data/db'),
|
||||
models = require('../../../core/server/models'),
|
||||
importer = require('../../../core/server/data/importer'),
|
||||
dataImporter = importer.importers[1],
|
||||
importOptions = {
|
||||
returnImportedData: true
|
@ -3,7 +3,7 @@ var should = require('should'),
|
||||
testUtils = require('../../utils'),
|
||||
_ = require('lodash'),
|
||||
Promise = require('bluebird'),
|
||||
Models = require('../../../server/models');
|
||||
Models = require('../../../core/server/models');
|
||||
|
||||
describe('Database Migration (special functions)', function () {
|
||||
before(testUtils.teardownDb);
|
@ -4,10 +4,10 @@ var should = require('should'),
|
||||
moment = require('moment-timezone'),
|
||||
rewire = require('rewire'),
|
||||
_ = require('lodash'),
|
||||
common = require('../../../../server/lib/common'),
|
||||
models = require('../../../../server/models'),
|
||||
testUtils = require('../../../../test/utils'),
|
||||
sequence = require('../../../../server/lib/promise/sequence');
|
||||
common = require('../../../../core/server/lib/common'),
|
||||
models = require('../../../../core/server/models'),
|
||||
testUtils = require('../../../utils'),
|
||||
sequence = require('../../../../core/server/lib/promise/sequence');
|
||||
|
||||
describe('Models: listeners', function () {
|
||||
var eventsToRemember = {},
|
||||
@ -29,7 +29,7 @@ describe('Models: listeners', function () {
|
||||
eventsToRemember[eventName] = callback;
|
||||
});
|
||||
|
||||
listeners = rewire('../../../../server/models/base/listeners');
|
||||
listeners = rewire('../../../../core/server/models/base/listeners');
|
||||
});
|
||||
|
||||
afterEach(function () {
|
@ -4,12 +4,12 @@ var should = require('should'),
|
||||
moment = require('moment'),
|
||||
_ = require('lodash'),
|
||||
Promise = require('bluebird'),
|
||||
sequence = require('../../../server/lib/promise/sequence'),
|
||||
urlService = require('../../../frontend/services/url'),
|
||||
ghostBookshelf = require('../../../server/models/base'),
|
||||
models = require('../../../server/models'),
|
||||
settingsCache = require('../../../server/services/settings/cache'),
|
||||
common = require('../../../server/lib/common'),
|
||||
sequence = require('../../../core/server/lib/promise/sequence'),
|
||||
urlService = require('../../../core/frontend/services/url'),
|
||||
ghostBookshelf = require('../../../core/server/models/base'),
|
||||
models = require('../../../core/server/models'),
|
||||
settingsCache = require('../../../core/server/services/settings/cache'),
|
||||
common = require('../../../core/server/lib/common'),
|
||||
configUtils = require('../../utils/configUtils'),
|
||||
DataGenerator = testUtils.DataGenerator,
|
||||
context = testUtils.context.owner,
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user