| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /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();
});
});
}
});