Skip to content

Test the derived default unit fallback - #964

Merged
VisLab merged 1 commit into
hed-standard:mainfrom
VisLab:fix_required
Nov 5, 2026
Merged

VisLab merged 1 commit into
hed-standard:mainfrom
VisLab:fix_required

Conversation

@VisLab

@VisLab VisLab commented Nov 5, 2026

Copy link
Copy Markdown
Member

SchemaUnitClass.defaultUnit falls back to the listed unit a default derives from, and no test failed when the fallback was removed. Add the HED 8.5.0 cases currentUnits (mA -> A) and resistanceUnits (kOhm -> Ohm). Ported from hed-typescript bc8ff63 (Copilot review of hed-standard/hed-typescript#291); the two copies of tests/otherTests/units.spec.js are identical again.

SchemaUnitClass.defaultUnit falls back to the listed unit a default
derives from, and no test failed when the fallback was removed. Add the
HED 8.5.0 cases currentUnits (mA -> A) and resistanceUnits (kOhm -> Ohm).
Ported from hed-typescript bc8ff63 (Copilot review of
hed-standard/hed-typescript#291); the two copies
of tests/otherTests/units.spec.js are identical again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@VisLab
VisLab requested a balanced review from Copilot November 5, 2026 12:47
@VisLab VisLab added tests Issues related to testcases alignment Alignment between hed-javascript and hed-typescript. labels Nov 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the added regression tests covering derived default units.

No open issues 🎉

What changed in this PR

Adds regression tests for SchemaUnitClass.defaultUnit when a declared default derives from a listed unit. No production code changes are included.

Changes:

  • Loads HED 8.5.0 for the derived-default cases.
  • Verifies currentUnits resolves mA to A and resistanceUnits resolves kOhm to Ohm, while checking each declared default.
File Description
tests/​otherTests/​units.spec.js Adds parameterized coverage for the derived default-unit fallback.

Review effort: Balanced

@VisLab
VisLab merged commit 4ef07d5 into hed-standard:main Nov 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alignment Alignment between hed-javascript and hed-typescript. tests Issues related to testcases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants