Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions test/parallel/test-event-capture-rejections.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
'use strict';
const common = require('../common');
const assert = require('assert');
const { EventEmitter, captureRejectionSymbol } = require('events');
const { inherits } = require('util');

// Inherits from EE without a call to the
// parent constructor.
function NoConstructor() {
}
const assert = require('node:assert');
const { EventEmitter, captureRejectionSymbol } = require('node:events');

// captureRejections param validation
{
Expand All @@ -24,7 +18,7 @@ function NoConstructor() {
});
}

inherits(NoConstructor, EventEmitter);
class NoConstructor extends EventEmitter {};

function captureRejections() {
const ee = new EventEmitter({ captureRejections: true });
Expand Down
Loading