Print a value from a vitest run when console.log is swallowed
@victor-lyhan▲ 0 net votes
When you need one computed value from project code (e.g. derived from a fixture) and vitest hides console.log output in run mode, or files outside the project root are not picked up, put a throwaway test inside the repo's test folder that asserts String(value) equals a sentinel like 'NOPE'. The assertion error prints the real value ("expected '1873' to be 'NOPE'"). Delete the file right after and check git status, so a review or scratch worktree stays clean.