Migrate tests to node:test and update CI#273
Merged
Merged
Conversation
Replace Jest-based test setup with native node:test/assert and update CI. Tests were refactored to use node:test and node:assert (many __tests__ updated), new auth token unit tests added, and routes_mounted.test.js reworked to a data-driven style. The database mock was rewritten to remove Jest-specific APIs and provide a lightweight mock/registry with resetMocks; jest.config.js was removed. GitHub Actions workflows now separate install, test (npm run test:ci) and coverage (npm run coverage:ci) steps. package.json dev tooling and test scripts were adjusted accordingly, and test bootstrap/loader/coverage artifacts were added while placeholder .txt test files were removed.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…c_artifacts.test.js
* Add middleware for PATCH override support Introduce createPatchOverrideMiddleware in rest.js to centralize validation of X-HTTP-Method-Override for POST-to-PATCH requests. Replace duplicated inline checks in routes/patchSet.js, routes/patchUnset.js, and routes/patchUpdate.js with the new middleware (each using a route-specific statusMessage). Also standardize error handling by ending 405 responses with res.status(405).end() and export the new middleware from rest.js. * End 405 responses and add route wrapper tests Replace patterns that set status and call next(res) with res.status(405).end() in route fallbacks (routes/query.js, routes/release.js, routes/search.js) to ensure the response is terminated immediately. Add route wrapper tests (routes/__tests__/route_wrappers.test.js) to validate method-override handling, unsupported-method fallbacks, client verify behavior, and API discovery. Include a test coverage inventory (test/coverage-inventory.json) to record current test/coverage state. * End responses for unsupported-method handlers Replace next(res) with res.status(405).end() in multiple route fallbacks to ensure responses are terminated immediately (bulkCreate, bulkUpdate, create, delete, history, id, overwrite, putUpdate, since). Update route wrapper tests to import additional routers, add helper asserting fallback behavior on specific paths, and add tests for static/index handlers. Update test coverage inventory to reflect the new/updated tests.
* Introduce ecosystem file and env-loader for RHEL * Introduce ecosystem file and env-loader for RHEL * changes from testing * cmon RHEL * back to 500M * 100% coverage
Adds two regex assertions to each sync-artifact test: - secrets.OPENAPI must appear verbatim (catches a rename that would silently break the receiver checkout step at runtime) - the literal 'cp source target' line must point at the expected paths (already covered for provider sync; now mirrored on shared sync) Backports improvements developed during TinyNode's parallel sync test where the same regression class actually bit us this week.
- bump peter-evans/create-pull-request v7 -> v8 - rename receiver checkout path rerum_openapi -> receiver - add `add-paths`, explicit `base: main`, `ref: main` on receiver checkout - add `test -f` verify-stub guard on both workflows (receiver stubs exist) - branch naming automation/sync-rerum-* -> sync/rerum-* - commit-message/title gain `chore:` prefix - PR body now matches the bullet-list format used by TinyNode and TinyPen - update tests to use `path:\s*receiver`, `@v\d+`, and new cp target regex
thehabes
approved these changes
May 21, 2026
…ntracts like other repos for consistency
thehabes
approved these changes
May 21, 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.
Replace Jest-based test setup with native node:test/assert and update CI. Tests were refactored to use node:test and node:assert (many tests/* updated), new auth token unit tests added, and routes_mounted.test.js reworked to a data-driven style. The database mock was rewritten to remove Jest-specific APIs and provide a lightweight mock/registry with resetMocks; jest.config.js was removed. GitHub Actions workflows now separate install, test (npm run test:ci) and coverage (npm run coverage:ci) steps. package.json dev tooling and test scripts were adjusted accordingly, and test bootstrap/loader/coverage artifacts were added while placeholder .txt test files were removed.