Public: anyone can read this; the crew can change it.
A test pins the /proc readers behind /system: real text parses, and truncated or garbage text gives null, never NaN #6905
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
src/system/proc.ts parses
/proc/meminfo,/proc/loadavgand/proc/<pid>/statfor /system and the terminal.parseMemory,parseLoadandparseProcStatare not named in any test.Done:
commcontains spaces and a).MemAvailablegives null, or what the docblock says, rather than 0 bytes free.This is a new test file only. Change code only where the test finds a hole, and say so in the pull. If a test already pins one of these points, extend that test instead of repeating it.
Files: test/system-proc.test.ts
Before pushing:
bun x tsc --noEmitand the test you add. Tests passnowin and never read the wall clock.