Skip to content

Commit

Permalink
test: adapt async operation test to v18+ (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS authored Jun 27, 2023
1 parent f054d34 commit 0b9aa12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/cmd-collect.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ test('collect command produces data files with content', function (t) {
// A `Promise.resolve()` call was added to bootstrap code in Node 12.16.x: https://github.com/nodejs/node/pull/30624
// Node.js 12.17.0 does not appear to show this `resolve()` call in its trace event log.
expected = ['PROMISE', 'Timeout']
} else if (semver.satisfies(process.version, '>= 15.0.0')) {
} else if (semver.satisfies(process.version, '>= 15.0.0 < 18.0.0')) {
// See: https://github.com/clinicjs/node-clinic-bubbleprof/pull/382#issuecomment-962766194
expected = ['TickObject', 'Timeout']
} else if (semver.satisfies(process.version, '>= 18.0.0')) {
expected = ['TickObject', 'TickObject', 'Timeout']
}

t.strictSame(asyncOperationTypes.sort(), expected)
Expand Down

0 comments on commit 0b9aa12

Please sign in to comment.