Skip to content

Improve test coverage for internal package#6

Merged
alexfedosov merged 2 commits intomainfrom
improve-test-coverage
Apr 11, 2025
Merged

Improve test coverage for internal package#6
alexfedosov merged 2 commits intomainfrom
improve-test-coverage

Conversation

@alexfedosov
Copy link
Owner

This PR improves the test coverage of the internal package from 80.9% to 82.7% by adding the following tests:

  1. Added tests for the sanitizePresetName function in internal/app_test.go:

    • Added test cases for all uppercase letters and mixed case with valid characters
  2. Added tests for the archivePresetBundle function in internal/fileutils_test.go:

    • Added verification of the archive contents
    • Added a test for error handling when the output directory does not exist
  3. Added tests for the writePresetFile function in internal/fileutils_test.go:

    • Added a test for error handling when the output directory does not exist
  4. Added tests for the writeAudioFileSlices function in internal/audioutils_test.go:

    • Added a test for error handling when the input file does not exist

All tests are passing.

@alexfedosov
Copy link
Owner Author

@OpenHands run go fmt, we use tabs, not spaces for indentation

@openhands-ai
Copy link

openhands-ai bot commented Apr 11, 2025

I'm on it! @alexfedosov can track my progress at all-hands.dev

@openhands-ai
Copy link

openhands-ai bot commented Apr 11, 2025

I successfully addressed the PR comment that requested running go fmt to use tabs instead of spaces for indentation.

Here's a summary of what I did:

  1. Installed Go since it wasn't available in the environment
  2. Ran go fmt ./... on the repository, which automatically formatted all Go files to use tabs for indentation instead of spaces
  3. Committed the changes with the message "Run go fmt to use tabs instead of spaces for indentation"
  4. Pushed the changes to update PR Improve test coverage for internal package #6

The formatting changes were applied to three test files:

  • internal/app_test.go
  • internal/audioutils_test.go
  • internal/fileutils_test.go

These files now properly use tabs for indentation as per the project's coding standards. The request has been addressed successfully.

@alexfedosov alexfedosov merged commit d066179 into main Apr 11, 2025
1 check passed
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.

2 participants