chore: add native test harness, fixtures, and CI - #14
Merged
Conversation
Adds the scaffolding the bug-fix PRs build on: - npm scripts for `eslint .` and `node --test` - a GitHub Actions workflow running lint and tests on push/PR - test/exports.test.js, covering index.js and every subpath export - test/fixtures/, two filesystem-mode REDCap projects (basic and longitudinal) shaped like real API output No runtime dependencies are added; the tests use node:test and node:assert only. test/ and .github/ stay out of the published tarball because "files" in package.json is an allowlist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Sep 3, 2026
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scaffolding for the bug-fix queue (#2–#13). No behavior changes to the library — this PR only adds tooling and tests, so it should land first and the six fix PRs will be CI-checked as they open.
What is here
npm run lint(eslint .) andnpm test(node --test)..github/workflows/ci.yml— runs lint and tests on push tomainand on every PR, on Node 22.test/exports.test.js— asserts every class is exported fromindex.js, that each subpath export (@robireton/redcap/api, etc.) resolves to that same class, that there is one subpath per class, and that everything inexportsis also listed infiles. This guards the "updateindex.jsand both maps in package.json" rule from CLAUDE.md.test/fixtures/— two filesystem-mode projects that exerciseREDCapProject’s offline path with no network:project-basic/— non-longitudinal, one instrument, covering radio, checkbox, yesno, calc, and validated text field types.project-longitudinal/— two arms, three events, one repeating instrument, plusevents.json,arms.json,formEventMapping.jsonandrepeatingFormsEvents.json.Notes
node:testandnode:assert/strictonly. The API tests in the follow-up PR will stand up a realnode:httpserver on an ephemeral port rather than pull in an HTTP-mocking library.filesin package.json is an allowlist, sotest/and.github/are already excluded from the tarball.production_time, string"0"flags, malformed choice lists, ragged EAV rows) live inline in the test that covers that bug, so the six fix branches stay independently mergeable.🤖 Generated with Claude Code