Skip to content

fix: resolve async issues in robustness tests#12

Merged
ramonclaudio merged 1 commit intomainfrom
fix/async-robustness-tests
Sep 6, 2025
Merged

fix: resolve async issues in robustness tests#12
ramonclaudio merged 1 commit intomainfrom
fix/async-robustness-tests

Conversation

@ramonclaudio
Copy link
Owner

Fixes failing fuzz-testing workflow due to unhandled async operations.

Problem

The fuzz-testing workflow was failing because:

  • detectPackageManager is async but tests weren't awaiting it properly
  • null/undefined inputs caused file system operations to fail after test completion
  • Generated "asynchronous activity after the test ended" warnings

Solution

  • Made detectPackageManager test async with proper await
  • Separated valid string inputs from null/undefined which should throw errors
  • Used for...of loops instead of forEach for async operations
  • Added proper error assertions for invalid inputs
  • Included all possible return values in test assertions

Testing

This fix ensures no asynchronous activity leaks after test completion and properly handles both valid and invalid input cases.

- Make detectPackageManager test async to properly await the function
- Separate valid string inputs from null/undefined which should throw
- Use for...of loops instead of forEach for async operations
- Add proper error assertions for invalid inputs
- Include all possible return values in assertions

Fixes failing fuzz-testing workflow due to unhandled async operations.
@ramonclaudio ramonclaudio merged commit 14e7f44 into main Sep 6, 2025
5 checks passed
@ramonclaudio ramonclaudio deleted the fix/async-robustness-tests branch September 6, 2025 00:34
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