~ubuntu-branches/ubuntu/trusty/nodejs/trusty-proposed

« back to all changes in this revision

Viewing changes to test/simple/test-event-emitter-once.js

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2013-12-12 23:04:07 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20131212230407-xfa6gka4c6oatsx1
Tags: 0.10.23~dfsg1-1
* Upstream update.
* Refresh patches, remove 1005 patch, applied upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
  assert.equal(1, times_hello_emited);
48
48
});
49
49
 
 
50
var times_recurse_emitted = 0;
 
51
 
 
52
e.once('e', function() {
 
53
        e.emit('e');
 
54
        times_recurse_emitted++;
 
55
});
 
56
 
 
57
e.once('e', function() {
 
58
        times_recurse_emitted++;
 
59
});
 
60
 
 
61
e.emit('e');
 
62
 
 
63
process.on('exit', function() {
 
64
  assert.equal(2, times_recurse_emitted);
 
65
});