Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve testing & output / error handling #596

Open
rgoldberg opened this issue Oct 25, 2024 · 0 comments
Open

Improve testing & output / error handling #596

rgoldberg opened this issue Oct 25, 2024 · 0 comments

Comments

@rgoldberg
Copy link
Contributor

rgoldberg commented Oct 25, 2024

Improve testing & output / error handling. Will possibly separate into multiple issues later.

  • Ensure everything can be mocked to be tested
  • Use proper dependency injection
  • Possibly change output generation & error handling. Either:
    • capture all printed output via captureStream
    • allow print target to be switched from stdout to a mutable String / redirect stdout to a String
    • collect multiple good outputs, multiple nonfatal warnings, and multiple fatal errors in one mechanism to handle all information (like Result, but allowing multiple values for success, nonfatal errors, and fatal errors)
  • Possibly test by running from command line instead of calling Swift code
  • Properly apportion code between Commands & Controllers
  • Possibly migrate to swift-testing (requires macOS 10.15+)
  • Replace XCTest with either Quick/Nimble or swift-testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant