test: add test for frame count being 0.5

The frame count is between 1 and 200. Testing 0.5 will be testing
decimal fraction truncation to 0 which is still invalid range.

PR-URL: https://github.com/nodejs/node/pull/57732
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Jake Yuesong Li
2025-04-03 01:24:21 +10:30
committed by Node.js GitHub Bot
parent 10f081e549
commit d4e9ae57d4

View File

@@ -47,6 +47,11 @@ const assert = require('node:assert');
}, common.expectsError({
code: 'ERR_OUT_OF_RANGE'
}));
assert.throws(() => {
getCallSites(0.5);
}, common.expectsError({
code: 'ERR_OUT_OF_RANGE'
}));
assert.throws(() => {
getCallSites(-1);
}, common.expectsError({