Skip to content

Commit 066d814

Browse files
TrottBridgeAR
authored andcommitted
test: remove unused output argument for getFrames()
PR-URL: #28183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 5d8dce4 commit 066d814

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

test/common/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,8 @@ Windows and `30` elsewhere.
450450

451451
Returns an array of all `.cpuprofile` files found in `dir`.
452452

453-
### getFrames(output, file, suffix)
453+
### getFrames(file, suffix)
454454

455-
* `output` Unused.
456455
* `file` {string} Path to a `.cpuprofile` file.
457456
* `suffix` {string} Suffix of the URL of call frames to retrieve.
458457
* returns { frames: [&lt;Object>], nodes: [&lt;Object>] }

test/common/cpu-prof.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function getCpuProfiles(dir) {
1414
.map((file) => path.join(dir, file));
1515
}
1616

17-
function getFrames(output, file, suffix) {
17+
function getFrames(file, suffix) {
1818
const data = fs.readFileSync(file, 'utf8');
1919
const profile = JSON.parse(data);
2020
const frames = profile.nodes.filter((i) => {
@@ -25,7 +25,7 @@ function getFrames(output, file, suffix) {
2525
}
2626

2727
function verifyFrames(output, file, suffix) {
28-
const { frames, nodes } = getFrames(output, file, suffix);
28+
const { frames, nodes } = getFrames(file, suffix);
2929
if (frames.length === 0) {
3030
// Show native debug output and the profile for debugging.
3131
console.log(output.stderr.toString());

test/parallel/test-cpu-prof-dir-worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ const {
4141
assert(fs.existsSync(dir));
4242
const profiles = getCpuProfiles(dir);
4343
assert.strictEqual(profiles.length, 2);
44-
const profile1 = getFrames(output, profiles[0], 'fibonacci.js');
45-
const profile2 = getFrames(output, profiles[1], 'fibonacci.js');
44+
const profile1 = getFrames(profiles[0], 'fibonacci.js');
45+
const profile2 = getFrames(profiles[1], 'fibonacci.js');
4646
if (profile1.frames.length === 0 && profile2.frames.length === 0) {
4747
// Show native debug output and the profile for debugging.
4848
console.log(output.stderr.toString());

0 commit comments

Comments
 (0)