Files
ECC/tests
Brian 434ded9b9d test: drive trySymlink through injected deps instead of patching globals
Review on #3830 pointed out that the helper's tests replaced methods on
the shared fs and console objects, which AGENTS.md rules out, and that
the recording arrays were mutated with push.

trySymlink now takes an optional deps argument in the shape
collectResources already uses, `(deps.symlinkSync || fs.symlinkSync)`,
so the refusal branches can be driven without touching anything shared.
The 13 existing call sites pass at most three arguments and are
unchanged. The recorders rebuild their arrays rather than appending.

Also adds a case that omits deps entirely, so the default dependency is
still covered rather than only the injected one.

Re-verified by mutation: emptying UNSUPPORTED_CODES, returning true
unconditionally, removing the rethrow, dropping the skip notice, and
ignoring the injected stand-in each fail 2 to 4 of the 8 cases.
2026-10-31 13:46:14 -04:00
..
2026-04-12 12:34:45 +05:30