Add 'registered' and 'unregistered' events for protocol module.

This is only used for writing specs.
This commit is contained in:
Cheng Zhao 2013-08-29 20:56:25 +08:00
parent bc4201f911
commit 261f50701a
2 changed files with 32 additions and 3 deletions

View file

@ -1,8 +1,7 @@
bindings = process.atomBinding 'protocol'
protocol = process.atomBinding 'protocol'
EventEmitter = require('events').EventEmitter
protocol = new EventEmitter
protocol[key] = value for key, value of bindings
protocol[key] = value for key, value of EventEmitter.prototype
protocol.RequestStringJob =
class RequestStringJob