Skip to content

#254: Add unit tests for dictionary data file templates #285

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

Merged
merged 2 commits into from
Jun 10, 2025

Conversation

Azher2Ali
Copy link
Contributor

@Azher2Ali Azher2Ali commented Jun 4, 2025

#254 : Add unit tests for dictionary data file templates

Summary

Added unit tests to validate the creation of dictionary data file templates, ensuring correct headers, delimiters, placeholder lines, and filenames are generated according to the schema and configuration.

Issues

Description of Changes

Server

Added unit tests for createDataFileTemplates method

  • Verifies that every header defined in the schema is added to the template
  • Confirms headers are added in the correct order as specified by the schema
  • Asserts that an empty row is created with one placeholder value for each header
  • Checks that the configured delimiter is applied correctly:
    • for custom-specified delimiters
    • for known file types (e.g. .tsv, .csv)
  • Validates that the generated template filename:
    • matches the schema name plus the configured file type
    • uses the correct file extension based on the configuration and known file types

Special Instructions

Before running these changes, you will need to ...
pnpm install
-->

Readiness Checklist

  • Self Review
    • I have performed a self review of code
    • I have run the application locally and manually tested the feature
    • I have checked all updates to correct typos and misspellings
  • Formatting
    • Code follows the project style guide
    • Autmated code formatters (ie. Prettier) have been run
  • Local Testing
    • Successfully built all packages locally
    • Successfully ran all test suites, all unit and integration tests pass
  • Updated Tests
    • Unit and integration tests have been added that describe the bug that was fixed or the features that were added

Sorry, something went wrong.

@Azher2Ali Azher2Ali requested review from joneubank and leoraba June 4, 2025 16:52

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@Azher2Ali Azher2Ali merged commit 3f3ffba into main Jun 10, 2025
2 checks passed
@Azher2Ali Azher2Ali deleted the chore/add-unit-tests-for-datafile-templates branch June 10, 2025 00:11
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.

None yet

2 participants