/
githubmirror
/
pm2
Обзор
Документация
Войти
/
githubmirror
/
pm2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
modules/pm2-axon/test/test.queue.js
25 строк
439 B
Unitech
v7 refactor
08 фев 2026, 17:04
08 фев 2026, 17:04
04fad96
Код
Авторство
О чём код?
var ss = require('../') , should = require('should'); var push = ss.socket('push') , pull = ss.socket('pull'); // .queue testing var pending = 3; push.bind(4000); push.send('foo'); push.send('bar'); push.send('baz'); push.queue.should.eql([['foo'], ['bar'], ['baz']]); pull.connect(4000); pull.on('message', function(msg){ push.queue.should.eql([]); --pending || (function(){ push.close(); pull.close(); })(); });