now includes mocha
This commit is contained in:
@ -10,4 +10,4 @@
|
||||
|
||||
var plugins = NpmtsPlugins.init();
|
||||
var paths = NpmtsPaths.init();
|
||||
NpmtsDefault.init();
|
||||
var promisechain = NpmtsPromisechain.init();
|
||||
|
@ -1,7 +1,8 @@
|
||||
/// <reference path="./index.ts" />
|
||||
|
||||
module NpmtsDefault {
|
||||
export var init = function() {
|
||||
export var run = function() {
|
||||
var done = plugins.q.defer();
|
||||
plugins.gulp.task("defaultTsd",function(cb){
|
||||
if(!process.env.TRAVIS) {
|
||||
plugins.g.tsd({
|
||||
@ -44,6 +45,7 @@ module NpmtsDefault {
|
||||
|
||||
plugins.gulp.task("defaultCleanup",function(cb){
|
||||
plugins.beautylog.success("TypeScript for this module compiled successfully.");
|
||||
done.resolve();
|
||||
cb();
|
||||
});
|
||||
|
||||
@ -52,5 +54,6 @@ module NpmtsDefault {
|
||||
});
|
||||
|
||||
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
||||
return done.promise;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
/// <reference path="./index.ts" />
|
||||
module NpmtsOptions {
|
||||
export var run = function(){
|
||||
var done = plugins.q.defer();
|
||||
done.resolve(); //TODO: check for options
|
||||
return done.promise;
|
||||
}
|
||||
}
|
@ -1,6 +1,10 @@
|
||||
/// <reference path="./index.ts" />
|
||||
module NpmtsPromisechain {
|
||||
export var init = function(){
|
||||
|
||||
var promisechain;
|
||||
NpmtsOptions.run()
|
||||
.then(NpmtsDefault.run)
|
||||
.then(NpmtsTests.run);
|
||||
return promisechain;
|
||||
}
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
/// <reference path="./index.ts" />
|
||||
module NpmtsTests {
|
||||
export var init = function() {
|
||||
export var run = function() {
|
||||
var done = plugins.q.defer();
|
||||
plugins.beautylog.info("Now running mocha tests");
|
||||
// Instantiate a Mocha instance.
|
||||
var mocha = new plugins.mocha();
|
||||
|
||||
var testDir = 'some/dir/test';
|
||||
var testDir = paths.testDir;
|
||||
|
||||
// Add each .js file to the mocha instance
|
||||
plugins.fs.readdirSync(testDir).filter(function(file){
|
||||
@ -23,5 +25,6 @@ module NpmtsTests {
|
||||
process.exit(failures);
|
||||
});
|
||||
});
|
||||
return done.promise;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user