Files
hapi/cli/src/test
Sharad.andGitHub 7a29b60353 fix(test): use portable ps axeww in test-process audit (#1869)
* fix(test): use portable `ps axeww` in test-process audit

The audit ran `ps eww` which is terminal-scoped on macOS (and exits 1
without a controlling terminal, failing the whole CLI suite via the
global-teardown audit). The previously suggested `-eww` also breaks the
scan: macOS treats `-e` in SysV form as "all processes" and silently
omits the environment dump, so a marked test child is never detected.
Use the BSD full-dump form `ps axeww` (all users + tty-less + env +
unlimited width), which ports across darwin and procps-ng. Add a
regression test that spawns a real marked child and asserts the audit
finds it.

* test(audit): skip live-process detection test on Windows

The scan function short-circuits to an empty list on win32 where ps
axeww is unavailable, so the assertion that finds a live child can
never pass on that platform.  Skip it conditionally.
2026-10-28 12:08:09 +08:00
..