Logo
Explore Help
Sign In
1berry/nodejs
1
0
Fork 0
You've already forked nodejs
Code Issues Packages Projects Releases Wiki Activity
nodejs/test/parallel/test-runner-filter-warning.js

12 lines
294 B
JavaScript
Raw Permalink Normal View History

test_runner: make end of work check stricter This commit updates the logic that checks for the end of the test run. Prior to this change, it was possible for root.run() to be called multiple times because of the way pending subtests were tracked. The extra calls to root.run() were harmless, but could trigger an EventEmitter leak warning due to 'abort' listeners being created. PR-URL: https://github.com/nodejs/node/pull/52326 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-04-10 22:43:10 -04:00
// Flags: --test-only
'use strict';
const common = require('../common');
const { test } = require('node:test');
const { defaultMaxListeners } = require('node:events');
process.on('warning', common.mustNotCall());
for (let i = 0; i < defaultMaxListeners + 1; ++i) {
test(`test ${i + 1}`);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 1293ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API