2016-01-21 19:07:25 +01:00
|
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
const assert = require('assert');
|
|
|
|
const sym = Symbol();
|
|
|
|
|
2016-01-28 16:21:57 +01:00
|
|
|
process.on('normal', common.mustCall((data) => {
|
2016-01-21 19:07:25 +01:00
|
|
|
assert.strictEqual(data, 'normalData');
|
|
|
|
}));
|
|
|
|
|
2016-01-28 16:21:57 +01:00
|
|
|
process.on(sym, common.mustCall((data) => {
|
2016-01-21 19:07:25 +01:00
|
|
|
assert.strictEqual(data, 'symbolData');
|
|
|
|
}));
|
|
|
|
|
2016-01-28 16:21:57 +01:00
|
|
|
process.on('SIGPIPE', common.mustCall((data) => {
|
2016-01-21 19:07:25 +01:00
|
|
|
assert.strictEqual(data, 'signalData');
|
|
|
|
}));
|
|
|
|
|
|
|
|
process.emit('normal', 'normalData');
|
|
|
|
process.emit(sym, 'symbolData');
|
|
|
|
process.emit('SIGPIPE', 'signalData');
|
2016-02-12 22:14:42 +01:00
|
|
|
|
2017-11-26 09:03:38 +01:00
|
|
|
assert.strictEqual(Number.isNaN(process._eventsCount), false);
|