mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
2b29df71eb
common.leakedGlobals() was exposed only to test its logic. The logic can instead be tested by running a fixture file that leaks a global and seeing if `common` causes an AssertionError on exit. This way, the entire functionality of leak detection is tested rather than just the leakedGlobals() function. It also reduces API surface area for the common monolith by one function. PR-URL: https://github.com/nodejs/node/pull/22965 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
6 lines
85 B
JavaScript
6 lines
85 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
|
|
global.gc = 42; // intentionally leak a global
|