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

Test helpers and unit tests #26

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

joshuamegnauth54
Copy link
Contributor

I implemented a few helper functions for tests as well as three tests for tab::scan_path.

The helper functions create a small, temporary file hierarchy using tempdir to test file operations. I also wrote a few helpers for tasks that will likely be repeated throughout tests e.g. comparing Item and Paths.

I'll work on writing more unit tests if these are okay so far.

joshuamegnauth54 and others added 3 commits January 31, 2024 21:32
Most tests would require a test file hierarchy instead of operating on a
live system.
Tests:
* Works on a valid path
* Returns an empty Vec on an invalid directory
* Returns an empty Vec for an empty directory

I also implemented a few test helpers that may be useful for other
unit tests.
@jackpot51 jackpot51 merged commit d6c5899 into pop-os:master Feb 1, 2024
@joshuamegnauth54 joshuamegnauth54 deleted the add-basic-unit-tests-1 branch April 5, 2024 02:00
wiiznokes added a commit to wiiznokes/cosmic-files that referenced this pull request Apr 24, 2024
jackpot51 pushed a commit that referenced this pull request Apr 26, 2024
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