Server IP : 85.214.239.14 / Your IP : 3.142.53.239 Web Server : Apache/2.4.62 (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 : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/cwd/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(); }); }); } });