mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-09-23 02:49:03 +03:00
Further grunt & test cleanup
This commit is contained in:
parent
b2b273a63a
commit
cd12210b0b
@ -21,6 +21,7 @@ var path = require('path'),
|
|||||||
'!node_modules/**',
|
'!node_modules/**',
|
||||||
'!core/test/**',
|
'!core/test/**',
|
||||||
'!core/client/assets/sass/**',
|
'!core/client/assets/sass/**',
|
||||||
|
'!core/server/data/export/exported*',
|
||||||
'!**/*.db*',
|
'!**/*.db*',
|
||||||
'!*.db*',
|
'!*.db*',
|
||||||
'!.sass*',
|
'!.sass*',
|
||||||
@ -32,7 +33,8 @@ var path = require('path'),
|
|||||||
'!CONTRIBUTING.md',
|
'!CONTRIBUTING.md',
|
||||||
'!SECURITY.md',
|
'!SECURITY.md',
|
||||||
'!.travis.yml',
|
'!.travis.yml',
|
||||||
'!Gemfile*'
|
'!Gemfile*',
|
||||||
|
'!*.html'
|
||||||
],
|
],
|
||||||
|
|
||||||
configureGrunt = function (grunt) {
|
configureGrunt = function (grunt) {
|
||||||
@ -878,7 +880,7 @@ var path = require('path'),
|
|||||||
|
|
||||||
grunt.registerTask('test-integration', 'Run integration tests', ['clean:test', 'setTestEnv', 'loadConfig', 'express:test', 'mochacli:integration', 'express:test:stop']);
|
grunt.registerTask('test-integration', 'Run integration tests', ['clean:test', 'setTestEnv', 'loadConfig', 'express:test', 'mochacli:integration', 'express:test:stop']);
|
||||||
|
|
||||||
grunt.registerTask('test-functional', 'Run casperjs tests only', ['clean:test', 'setTestEnv', 'express:test', 'spawn-casperjs', 'express:test:stop']);
|
grunt.registerTask('test-functional', 'Run casperjs tests only', ['clean:test', 'setTestEnv', 'loadConfig', 'express:test', 'spawn-casperjs', 'express:test:stop']);
|
||||||
|
|
||||||
grunt.registerTask('validate', 'Run tests and lint code', ['jslint', 'test-unit', 'test-integration', 'test-functional']);
|
grunt.registerTask('validate', 'Run tests and lint code', ['jslint', 'test-unit', 'test-integration', 'test-functional']);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*globals describe, beforeEach, it*/
|
/*globals describe, beforeEach, afterEach, it*/
|
||||||
var fs = require('fs-extra'),
|
var fs = require('fs-extra'),
|
||||||
should = require('should'),
|
should = require('should'),
|
||||||
sinon = require('sinon'),
|
sinon = require('sinon'),
|
||||||
@ -54,7 +54,7 @@ describe('Admin Controller', function () {
|
|||||||
it('should return 415 for invalid file type', function () {
|
it('should return 415 for invalid file type', function () {
|
||||||
res.send = sinon.stub();
|
res.send = sinon.stub();
|
||||||
req.files.uploadimage.name = 'INVALID.jpg';
|
req.files.uploadimage.name = 'INVALID.jpg';
|
||||||
req.files.uploadimage.type = 'application/octet-stream'
|
req.files.uploadimage.type = 'application/octet-stream';
|
||||||
admin.uploader(req, res);
|
admin.uploader(req, res);
|
||||||
res.send.calledOnce.should.be.true;
|
res.send.calledOnce.should.be.true;
|
||||||
res.send.args[0][0].should.equal(415);
|
res.send.args[0][0].should.equal(415);
|
||||||
|
13
core/test/unit/frontend_spec.js
Normal file
13
core/test/unit/frontend_spec.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/*globals describe, beforeEach, afterEach, it*/
|
||||||
|
var should = require('should'),
|
||||||
|
sinon = require('sinon'),
|
||||||
|
when = require('when'),
|
||||||
|
|
||||||
|
// Stuff we are testing
|
||||||
|
frontend = require('../../server/controllers/frontend');
|
||||||
|
|
||||||
|
describe('Frontend Controller', function () {
|
||||||
|
describe('homepage', function () {
|
||||||
|
// No tests yet, shows up in coverage report
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user