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 Error Handling for readAllUserDataFiles Function #117

Open
emmalgs opened this issue Aug 31, 2023 · 0 comments
Open

Test Error Handling for readAllUserDataFiles Function #117

emmalgs opened this issue Aug 31, 2023 · 0 comments

Comments

@emmalgs
Copy link

emmalgs commented Aug 31, 2023

Ticket: Test Error Handling for readAllUserDataFiles Function

What it is: Write a test case to verify the error handling behavior of the readAllUserDataFiles function when reading user data files encounters an error.

Context: Testing error handling ensures that the function responds appropriately when any part of the reading process fails.

Acceptance Criteria:

  • Inside the describe block for readAllUserDataFiles, write a test case with an appropriate description (e.g., "should handle error when reading user data files").
  • Utilize Jest's mock functions to simulate an error scenario for fs.readdir and readUserDataFile.
  • Use the expect function to verify that the function rejects with the expected error when any part of the reading process fails.

By completing these tickets, you will have comprehensive tests for the readAllUserDataFiles function in your FileSystemService. This will help ensure that the function performs as expected in both successful and error scenarios.

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

No branches or pull requests

1 participant