mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14: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/**',
|
||||
'!core/test/**',
|
||||
'!core/client/assets/sass/**',
|
||||
'!core/server/data/export/exported*',
|
||||
'!**/*.db*',
|
||||
'!*.db*',
|
||||
'!.sass*',
|
||||
@ -32,7 +33,8 @@ var path = require('path'),
|
||||
'!CONTRIBUTING.md',
|
||||
'!SECURITY.md',
|
||||
'!.travis.yml',
|
||||
'!Gemfile*'
|
||||
'!Gemfile*',
|
||||
'!*.html'
|
||||
],
|
||||
|
||||
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-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']);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*globals describe, beforeEach, it*/
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var fs = require('fs-extra'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
@ -54,7 +54,7 @@ describe('Admin Controller', function () {
|
||||
it('should return 415 for invalid file type', function () {
|
||||
res.send = sinon.stub();
|
||||
req.files.uploadimage.name = 'INVALID.jpg';
|
||||
req.files.uploadimage.type = 'application/octet-stream'
|
||||
req.files.uploadimage.type = 'application/octet-stream';
|
||||
admin.uploader(req, res);
|
||||
res.send.calledOnce.should.be.true;
|
||||
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