Separate model tests to separate tasks/directory.

refs #921
This commit is contained in:
Fabian Becker 2013-10-29 21:34:47 +00:00 committed by Hannah Wolfe
parent 3d42a3338f
commit 933a8c764a
7 changed files with 16 additions and 10 deletions

View File

@ -237,6 +237,10 @@ var path = require('path'),
'core/test/unit/**/export_spec.js',
'core/test/unit/**/import_spec.js'
]
},
integration: {
src: ['core/test/integration/**/model*_spec.js']
}
},
@ -865,9 +869,11 @@ var path = require('path'),
grunt.registerTask('test-unit', 'Run unit tests', ['clean:test', 'setTestEnv', 'loadConfig', 'express:test', 'mochacli:all']);
grunt.registerTask('test-integration', 'Run integration tests', ['clean:test', 'setTestEnv', 'loadConfig', 'express:test', 'mochacli:integration']);
grunt.registerTask('test-functional', 'Run casperjs tests only', ['clean:test', 'setTestEnv', 'express:test', 'spawn-casperjs']);
grunt.registerTask('validate', 'Run tests and lint code', ['jslint', 'test-unit', 'test-functional']);
grunt.registerTask('validate', 'Run tests and lint code', ['jslint', 'test-unit', 'test-integration', 'test-functional']);
grunt.registerTask('docs', 'Generate Docs', ['groc']);

View File

@ -1,5 +1,5 @@
/*globals describe, it, before, beforeEach, afterEach */
var testUtils = require('./testUtils'),
var testUtils = require('../unit/testUtils'),
should = require('should'),
errors = require('../../server/errorHandling'),
@ -97,4 +97,4 @@ describe("Permission Model", function () {
done();
}).then(null, done);
});
});
});

View File

@ -1,5 +1,5 @@
/*globals describe, before, beforeEach, afterEach, it */
var testUtils = require('./testUtils'),
var testUtils = require('../unit/testUtils'),
should = require('should'),
_ = require('underscore'),
when = require('when'),

View File

@ -1,5 +1,5 @@
/*globals describe, it, before, beforeEach, afterEach */
var testUtils = require('./testUtils'),
var testUtils = require('../unit/testUtils'),
should = require('should'),
errors = require('../../server/errorHandling'),
@ -97,4 +97,4 @@ describe("Role Model", function () {
done();
}).then(null, done);
});
});
});

View File

@ -1,5 +1,5 @@
/*globals describe, before, beforeEach, afterEach, it*/
var testUtils = require('./testUtils'),
var testUtils = require('../unit/testUtils'),
should = require('should'),
_ = require("underscore"),

View File

@ -1,5 +1,5 @@
/*globals describe, before, beforeEach, afterEach, it */
var testUtils = require('./testUtils'),
var testUtils = require('../unit/testUtils'),
_ = require("underscore"),
when = require('when'),
sequence = require('when/sequence'),

View File

@ -1,5 +1,5 @@
/*globals describe, before, beforeEach, afterEach, it*/
var testUtils = require('./testUtils'),
var testUtils = require('../unit/testUtils'),
should = require('should'),
when = require('when'),
_ = require('underscore'),
@ -174,4 +174,4 @@ describe('User Model', function run() {
});
});
});
});