Closed jonathanfallon closed 4 months ago
The updates across various integration specs and action files in the api/src/pdc
directory focus on refining test descriptions and error handling. Key changes include clearer labeling of test cases as success or error, more detailed test descriptions for error scenarios, and the introduction of new tests for parameter validation in service actions.
Files | Change Summary |
---|---|
.../test/handlerMacro.integration.spec.ts .../test/serviceProviderPermissionsMacro.integration.spec.ts |
Updated test descriptions to include success or error labels, and modified parameters for clarity. |
.../test/handlerMacro.ts |
Reordered imports, added title generation function, and enhanced error handling in the handlerMacro function. |
.../services/cee/actions/*.integration.spec.ts |
Added and updated test cases for error handling with various invalid parameters, and updated success and error test descriptions across multiple service action files. |
🐰✨ In the realm of code, where tests and types play, A rabbit hopped through, refining the way. "Success!" and "Error," now clearly displayed, With every small change, a smoother path laid. Celebrate each update, as tests now convey, A story of checks, in a much clearer array. 🎉 🐰✨
api/src/pdc/providers/test/handlerMacro.integration.spec.ts (2)
`56-56`: Updated test description to include 'Success' prefix enhances clarity and aligns with PR objectives. --- `57-57`: Updated test description to include 'Error' prefix enhances clarity and aligns with PR objectives.api/src/pdc/services/cee/actions/ImportCeeIdentityAction.integration.spec.ts (6)
`52-52`: Updated test description 'Invalid params empty' clearly indicates the scenario being tested, aligning with PR objectives. --- `63-63`: Updated test description 'Invalid params last_name_trunc' enhances clarity and specificity, aligning with PR objectives. --- `74-74`: Updated test description 'Invalid params unsupported journey type' enhances clarity and specificity, aligning with PR objectives. --- `85-85`: Updated test description 'Invalid params datetime' enhances clarity and specificity, aligning with PR objectives. --- `96-96`: Updated test description 'Invalid params phone_trunc' enhances clarity and specificity, aligning with PR objectives. --- `106-106`: Added test case 'Unauthorized' enhances test coverage and clarity, aligning with PR objectives.api/src/pdc/services/cee/actions/ImportCeeAction.integration.spec.ts (7)
`53-53`: Updated test description 'Invalid params empty' clearly indicates the scenario being tested, aligning with PR objectives. --- `64-64`: Updated test description 'Invalid params last_name_trunc' enhances clarity and specificity, aligning with PR objectives. --- `75-75`: Updated test description 'Invalid params unsupported journey type' enhances clarity and specificity, aligning with PR objectives. --- `86-86`: Updated test description 'Invalid params datetime' enhances clarity and specificity, aligning with PR objectives. --- `97-97`: Updated test description 'Invalid params phone_trunc' enhances clarity and specificity, aligning with PR objectives. --- `107-107`: Added test case 'Unauthorized' enhances test coverage and clarity, aligning with PR objectives. --- `110-110`: Added test case 'Success' enhances test coverage and clarity, aligning with PR objectives.api/src/pdc/services/cee/actions/SimulateCeeAction.integration.spec.ts (7)
`78-78`: Updated test description 'Invalid last_name_trunc param' clearly indicates the scenario being tested, aligning with PR objectives. --- `89-89`: Updated test description 'Invalid journey_type param' enhances clarity and specificity, aligning with PR objectives. --- `100-100`: Updated test description 'Invalid driving_license param' enhances clarity and specificity, aligning with PR objectives. --- `111-111`: Updated test description 'Invalid phone_trunc param' enhances clarity and specificity, aligning with PR objectives. --- `121-121`: Added test case 'Unauthorized' enhances test coverage and clarity, aligning with PR objectives. --- `126-126`: Added test case 'Success' enhances test coverage and clarity, aligning with PR objectives. --- `129-129`: Added test case 'Conflict' enhances test coverage and clarity, aligning with PR objectives.api/src/pdc/providers/test/handlerMacro.ts (4)
`1-1`: Reordering of imports improves readability and consistency. --- `3-3`: Reordering of imports improves readability and consistency. --- `34-37`: Addition of the `title` function enhances test setup flexibility and aligns with PR objectives. --- `63-91`: Enhanced `handlerMacro` function with a `try-catch` block improves error handling and robustness of the test suite.api/src/pdc/services/cee/actions/RegisterCeeAction.integration.spec.ts (1)
`70-70`: Updated test description 'Invalid last_name_trunc param' clearly indicates the scenario being tested, aligning with PR objectives.
add titles to tests
Summary by CodeRabbit