You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the same directory, create a new file for your dataset's provider tests, named similarly to your provider with a test prefix, e.g., [YourDatasetName]Provider.test.ts.
Create test functions that cover different scenarios your data provider might encounter. This includes different demographic breakdowns, geographic levels (national, state, county), and any other significant variations in data requests. For each test:
Define the dataset IDs and breakdowns you'll test against.
Use mock data and responses to simulate the fetching process.
Assert that the data provider returns the expected results.
Implement a utility function similar to ensureCorrectDatasetsDownloaded to verify that your data provider correctly identifies and fetches the necessary datasets based on the breakdowns and demographic types provided in the query.
For each test, document the specific scenario, such as "Testing data fetch for state-level race breakdown."
The text was updated successfully, but these errors were encountered:
…tcherInstitute#3387)
# Description and Motivation
- creates test cases for Maternal Mortality Data Provider
closesSatcherInstitute#3305
## Has this been tested? How?
- tests pass locally
## Screenshots (if appropriate)
<img width="441" alt="Screenshot 2024-06-19 at 2 37 12 PM"
src="https://gist.github.com/assets/28677929/5b8da1c5-ab18-4c8c-8163-b34598c0d437">
## Types of changes
(leave all that apply)
- New content or feature
## New frontend preview link is below in the Netlify comment 😎
Creating Test Cases for the New Data Provider
[YourDatasetName]Provider.test.ts
.ensureCorrectDatasetsDownloaded
to verify that your data provider correctly identifies and fetches the necessary datasets based on the breakdowns and demographic types provided in the query.The text was updated successfully, but these errors were encountered: