/
githubmirror
/
pm2
Обзор
Документация
Войти
/
githubmirror
/
pm2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/programmatic/client.mocha.js
59 строк
1 KB
Unitech
#2176 #2175 keep compatibility with PM2 v1 API + change independant to independent + adapt tests
02 июл 2016, 14:52
02 июл 2016, 14:52
227c742
Код
Авторство
О чём код?
var should = require('should'); var Client = require('../../lib/Client'); describe('Client Daemon', function() { var client; it('should instanciate a new client', function() { client = new Client({ independent : true }); should.exist(client.rpc_socket_file); should.exist(client.pub_socket_file); should.exist(client.pm2_home); should.exist(client.daemon_mode); }); it('should start a deamon', function(done) { client.start(done); }); it('should launch bus system', function(done) { client.launchBus(done); }); it('should get exposed methods', function(done) { client.getExposedMethods(done); }); it('should execute a daemon function', function(done) { client.executeRemote('ping', {}, function(err, res) { res.msg.should.eql('pong'); done(err); }); }); it('should disconnwct bus', function(done) { client.disconnectBus(done); }); it('should kill daemon', function(done) { client.killDaemon(done); }); // It is the job of the CLI describe.skip('Custom PM2 Home location', function() { it('should instanciate a PM2 on another folder', function(done) { client = new Client({ pm2_home : '/tmp/test' }); should(client.pm2_home).eql('/tmp/test') client.start(done); }); it('should kill daemon', function(done) { client.killDaemon(done); }); }); });