Skip to content

Commit

Permalink
test: add test for known issue with event emitters
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Mar 10, 2016
1 parent 0ea3899 commit e27cede
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/known_issues/test-events-proto.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';
// Refs: https://github.com/nodejs/node/issues/728
const common = require('../common');
const assert = require('assert');

const EventEmitter = require('events').EventEmitter;
const e = new EventEmitter();

e.on('__proto__', common.mustCall(function(val) {
assert.deepEqual(val, 1);
}));
e.emit('__proto__', 1);

0 comments on commit e27cede

Please sign in to comment.