You can access this module by doing: `require("events");`
Typically, event names are represented by a camel-cased string, however,
-there aren't any strict restrictions on that, as any string will be accepted.
+there aren't any strict restrictions on that, as any valid property key will be
+accepted.
Functions can then be attached to objects, to be executed when an event
is emitted. These functions are called _listeners_. Inside a listener
### Event: 'newListener'
-* `event` {String} The event name
+* `event` {String|Symbol} The event name
* `listener` {Function} The event handler function
This event is emitted *before* a listener is added. When this event is
### Event: 'removeListener'
-* `event` {String} The event name
+* `event` {String|Symbol} The event name
* `listener` {Function} The event handler function
This event is emitted *after* a listener is removed. When this event is
--- /dev/null
+'use strict';
+
+const common = require('../common');
+const EventEmitter = require('events');
+const assert = require('assert');
+
+const ee = new EventEmitter();
+const foo = Symbol('foo');
+const listener = common.mustCall(function() {});
+
+ee.on(foo, listener);
+assert.deepEqual(ee.listeners(foo), [listener]);
+
+ee.emit(foo);
+
+ee.removeAllListeners();
+assert.deepEqual(ee.listeners(foo), []);
+
+ee.on(foo, listener);
+assert.deepEqual(ee.listeners(foo), [listener]);
+
+ee.removeListener(foo, listener);
+assert.deepEqual(ee.listeners(foo), []);