2016-05-30 00:28:47 +00:00
|
|
|
import "typings-global";
|
|
|
|
import * as plugins from "./npmci.plugins";
|
2016-05-30 01:40:07 +00:00
|
|
|
import {bash} from "./npmci.bash";
|
2016-05-30 00:28:47 +00:00
|
|
|
import {install} from "./npmci.install";
|
2016-05-30 01:40:07 +00:00
|
|
|
|
2016-05-30 00:28:47 +00:00
|
|
|
export let test = (versionArg) => {
|
|
|
|
let done = plugins.q.defer();
|
|
|
|
install(versionArg)
|
|
|
|
.then(function(){
|
2016-05-30 00:35:44 +00:00
|
|
|
plugins.beautylog.info("now installing dependencies:");
|
2016-05-30 01:40:07 +00:00
|
|
|
bash("npm install");
|
2016-05-30 00:28:47 +00:00
|
|
|
plugins.beautylog.info("now starting tests:");
|
2016-05-30 01:40:07 +00:00
|
|
|
bash("npm test");
|
2016-05-30 00:28:47 +00:00
|
|
|
plugins.beautylog.success("test finished");
|
|
|
|
done.resolve();
|
|
|
|
})
|
|
|
|
return done.promise;
|
2016-05-29 20:54:59 +00:00
|
|
|
}
|