npmci/dist/npmci.test.js

21 lines
2.4 KiB
JavaScript
Raw Permalink Normal View History

2016-05-30 00:29:30 +00:00
"use strict";
require("typings-global");
var plugins = require("./npmci.plugins");
2016-05-30 01:40:07 +00:00
var npmci_bash_1 = require("./npmci.bash");
2016-05-30 00:29:30 +00:00
var npmci_install_1 = require("./npmci.install");
exports.test = function (versionArg) {
var done = plugins.q.defer();
npmci_install_1.install(versionArg)
.then(function () {
2016-05-30 01:11:13 +00:00
plugins.beautylog.info("now installing dependencies:");
2016-05-30 01:40:07 +00:00
npmci_bash_1.bash("npm install");
2016-05-30 00:29:30 +00:00
plugins.beautylog.info("now starting tests:");
2016-05-30 01:40:07 +00:00
npmci_bash_1.bash("npm test");
2016-05-30 00:29:30 +00:00
plugins.beautylog.success("test finished");
done.resolve();
});
return done.promise;
};
2016-05-30 01:40:07 +00:00
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBQzNDLDJCQUFtQixjQUFjLENBQUMsQ0FBQTtBQUNsQyw4QkFBc0IsaUJBQWlCLENBQUMsQ0FBQTtBQUU3QixZQUFJLEdBQUcsVUFBQyxVQUFVO0lBQ3pCLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUM7SUFDN0IsdUJBQU8sQ0FBQyxVQUFVLENBQUM7U0FDZCxJQUFJLENBQUM7UUFDRixPQUFPLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyw4QkFBOEIsQ0FBQyxDQUFDO1FBQ3ZELGlCQUFJLENBQUMsYUFBYSxDQUFDLENBQUM7UUFDcEIsT0FBTyxDQUFDLFNBQVMsQ0FBQyxJQ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