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

add property-based tests for audio #15

Closed
wants to merge 5 commits into from
Closed

Conversation

younes-io
Copy link
Contributor

@younes-io younes-io commented Dec 24, 2023

This PR integrates fast-check property-based testing into the existing test suite to ensure that the spy calls on the fetcher function match the expected API calls. The tests now cover multiple scenarios and edge cases, dynamically generating inputs to validate the robustness of the API interaction.

Key changes include:

  • Mocking the fetcher function using vitest to intercept and assert its calls
  • Utilizing fast-check to create a wide range of inputs, including URLs and options
  • Implementing an asyncProperty test to asynchronously verify the behavior of the API calling function under various generated conditions
  • Clearing the mock and setting up a resolved value before each property test to isolate the test cases

By employing property-based testing, we aim to catch more bugs by checking the correctness of the code against a broader set of possible inputs. This should lead to a more reliable and maintainable codebase.

Copy link

vercel bot commented Dec 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 30, 2023 8:53am

@younes-io
Copy link
Contributor Author

younes-io commented Dec 24, 2023

I cannot check why the deployment failed... EVen though I have an account, Vercel prevents me from landing in the Deployment failure page.. 404 (maybe due to permissions)

@younes-io
Copy link
Contributor Author

@sharabash @osamasayed could you please help on this ?

@younes-io
Copy link
Contributor Author

@ahmedriad1 any issue on this ? anything I could do to unblock it ?

@younes-io
Copy link
Contributor Author

No response, so I'm closing this abandoned PR.

@younes-io younes-io closed this Oct 19, 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