Mutation triage: drop a redundant null guard in parseFreeMiB
String(null) and String(undefined) already fail the integer test, so the ?? "" guard decided nothing; the Stryker mutant of it survived. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
375c2faf4e
commit
455cedb3c3
1 changed files with 1 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ export async function admitThen(gate, job) {
|
|||
|
||||
// nvidia-smi's first line is the free MiB as a base-10 integer; anything else is null.
|
||||
export function parseFreeMiB(stdout) {
|
||||
const line = String(stdout ?? "").split("\n")[0].trim();
|
||||
const line = String(stdout).split("\n")[0].trim();
|
||||
return /^\d+$/.test(line) ? Number(line) : null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue