| Server IP : 85.214.239.14 / Your IP : 216.73.216.122 Web Server : Apache/2.4.65 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/root/usr/lib/node_modules/pm2/node_modules/vizion/test/functional/ |
Upload File : |
var assert = require("assert");
var shell = require("shelljs");
var vizion = require("../../index.js");
/*
To enable a sample test suite, remove the _disabled
and fill in the strings. One way to fetch these values is to
create the sample directory, enter it as the directory,
and then run this test suite (npm test).
The test will return the expected value (a blank string),
and the actual value, which can be then used as the string to
test.
*/
var sample = {
svn: {
directory: "./test/fixtures/test_svn/",
url: "https://github.com/jshkurti/vizionar_test",
revision: "r3",
comment: "dat commit though",
branch: "vizionar_test",
update_time: "2014-10-21T12:29:21.289Z"
},
hg: {
directory: "./test/fixtures/test_hg/",
url: "https://jshkurti@bitbucket.org/jshkurti/vizionar_test",
revision: "0:a070c08854c3",
comment: "Initial commit with contributors",
branch: "default",
update_time: "2014-10-21T12:42:31.017Z"
}
};
describe("vizion.analyze()", function() {
if (shell.which('svn')) {
it.skip("Pulling from Subversion", function(done) {
this.timeout(5000);
vizion.analyze({folder: sample.svn.directory}, function(err, metadata) {
assert.equal(err, null);
assert.equal(metadata.url, sample.svn.url);
assert.equal(metadata.revision, sample.svn.revision);
assert.equal(metadata.comment, sample.svn.comment);
assert.equal(metadata.branch, sample.svn.branch);
done();
});
});
}
if (shell.which('hg')) {
it("Pulling from Mercurial", function(done) {
this.timeout(5000);
vizion.analyze({folder: sample.hg.directory}, function(err, metadata) {
assert.equal(err, null);
assert.equal(metadata.url, sample.hg.url);
assert.equal(metadata.revision, sample.hg.revision);
assert.equal(metadata.comment, sample.hg.comment);
assert.equal(metadata.branch, sample.hg.branch);
done();
});
});
}
});