Skip to content

Add unit tests for in-browser validator helpers (validatePsychDS) #94

@htsukamoto5

Description

@htsukamoto5

Follow-up from the review of #92 (in-browser Psych-DS validation).

The validation module has pure, easily-testable logic that currently has no test coverage:

  • dataFilePath / dataset layout mapping (src/datasetLayout.ts)
  • insertFile — nested file-tree dict construction, directory creation
  • buildFileTree — root metadata + data/ nesting
  • the issue parser in validatePsychDS — severity routing (error vs warning) and evidence deduplication

These can be tested without the validator browser bundle (only validateWeb itself needs mocking, which we can skip for now).

Blocked on: the frontend package has no test infrastructure yet (no test runner/script), unlike metadata and cli which use jest. We're still deciding how to approach frontend testing (e.g. vitest), so this is parked until that decision is made.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions