Skip to content

test: add coverage for installManagedSettings#97

Merged
dean0x merged 1 commit intomainfrom
test/managed-settings-coverage
Mar 9, 2026
Merged

test: add coverage for installManagedSettings#97
dean0x merged 1 commit intomainfrom
test/managed-settings-coverage

Conversation

@dean0x
Copy link
Owner

@dean0x dean0x commented Mar 9, 2026

Summary

  • Add 6 unit tests for installManagedSettings() covering all testable code paths (unsupported platform, template read failure, direct write, merge with existing settings, EACCES non-TTY, non-EACCES errors)
  • Update CHANGELOG [Unreleased] with sudo trust prompt (chore: add sudo trust prompt before managed settings write #96) and test coverage entries

Test plan

  • npm test — all 191 tests pass (was 185)
  • No regressions in existing tests
  • Build passes

Add 6 tests covering installManagedSettings paths:
- Unsupported platform (getManagedSettingsPath throws)
- Template read failure
- Direct write success
- Merge with existing managed settings (preserves entries)
- EACCES + non-TTY returns false
- Non-EACCES write errors return false

Update CHANGELOG [Unreleased] with sudo trust prompt and test coverage entries.
@dean0x dean0x merged commit 3384082 into main Mar 9, 2026
4 checks passed
@dean0x dean0x deleted the test/managed-settings-coverage branch March 9, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant