smartgit/test/test.js

36 lines
3.7 KiB
JavaScript
Raw Normal View History

2016-06-12 14:46:59 +00:00
"use strict";
require("typings-test");
2016-03-30 23:59:45 +00:00
var path = require("path");
2016-06-12 14:46:59 +00:00
require("should");
var smartgit = require("../dist/index");
2016-03-30 23:59:45 +00:00
describe("smartgit", function () {
describe(".clone", function () {
2016-06-12 14:46:59 +00:00
it("should clone a repository using ssh and sshkey", function (done) {
2016-03-30 23:59:45 +00:00
this.timeout(10000);
smartgit.clone({
2016-06-12 14:46:59 +00:00
from: "git@github.com:pushrocks/docs.git",
2016-03-30 23:59:45 +00:00
to: path.resolve("./test/temp/")
}).then(function () {
done();
});
});
2016-06-12 14:46:59 +00:00
it("should clone a repository using https", function (done) {
this.timeout(10000);
smartgit.clone({
from: "https://github.com/pushrocks/docs.git",
to: path.resolve("./test/temp2/")
}).then(function () {
done();
});
});
2016-03-30 23:59:45 +00:00
});
describe(".check", function () {
});
describe("commit", function () {
});
describe("init", function () {
});
});
2016-06-12 14:46:59 +00:00
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFFdEIsSUFBTyxJQUFJLFdBQVcsTUFBTSxDQUFDLENBQUM7QUFDOUIsUUFBTyxRQUVQLENBQUMsQ0FGYztBQUVmLElBQU8sUUFBUSxXQUFXLGVBQWUsQ0FBQyxDQUFDO0FBRTNDLFFBQVEsQ0FBQyxVQUFVLEVBQUM7SUFDaEIsUUFBUSxDQUFDLFFBQVEsRUFBQztRQUNkLEVBQUUsQ0FBQyxnREFBZ0QsRUFBQyxVQUFTLElBQUk7WUFDN0QsSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsQ0FBQztZQUNwQixRQUFRLENBQUMsS0FBSyxDQUFDO2dCQUNYLElBQUksRUFBQyxtQ0FBbUM7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bigpe1xuXG4gICAgfSk7XG4gICAgZGVzY3JpYmUoXCJpbml0XCIsZnVuY3Rpb24oKXtcblxuICAgIH0pO1xufSk7Il19