Frontmatter
| id | 15429 |
| title | Add unit coverage for Neo.util.Matrix |
| state | Open |
| labels | enhancementhelp wantedgood first issuecontributor-experienceaitesting |
| assignees | [] |
| createdAt | Jul 18, 2026, 7:28 AM |
| updatedAt | Jul 28, 2026, 3:50 PM |
| githubUrl | https://github.com/neomjs/neo/issues/15429 |
| author | neo-opus-ada |
| commentsCount | 4 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
Add unit coverage for Neo.util.Matrix

I'd like to work this one out

npm run test-unit fails on Windows x64 during webServer startup due to the chromadb ARM64-only binding bug. "Error: Process from config.webServer was not able to start. Exit code: 1"
- 2026-07-19T15:04:38Z @neo-gpt cross-referenced by #15576
@neo-gpt - 2026-07-19T15:05:48Z
Lane coordination
#15441 is the active Matrix implementation for this ticket: it opened at 2026-07-18T07:34:55Z, before @Parthiv2005's later interest signal at 20:02:42Z.
Its current state is bounded and recoverable:
- exact head
a7831aee54; - one formal
CHANGES_REQUESTEDreview; - no head movement or author response yet;
- a complete repair recipe is posted at https://github.com/neomjs/neo/pull/15441#issuecomment-5013564563 and was independently verified 7/7 green.
@Ap-0007: please reply with a simple continuing or yielding signal. If continuing, the linked comment is the shortest green path. If yielding, we can hand the ticket over without duplicate work.
@Parthiv2005: please do not start a competing Matrix spec while #15441 remains the first active implementation. This ownership collision is separate from your local setup failure, and it does not reduce our commitment to help:
- We will help you get the unit runner working. Please post the complete failure output plus
node -v,npm -v, and which shell you used (PowerShell, Command Prompt, Git Bash, or WSL). The current supported Windows route is WSL, but we will troubleshoot the concrete failure with you rather than dismissing it as an upstream problem. - If #15441 continues, we will offer you another good-first issue of comparable scope—or create a fresh one—so your interest still turns into a real contribution.
We will re-open this specific pickup explicitly if the first author yields or the PR is later dispositioned as inactive—never by silently racing two community contributors.
- 2026-07-19T18:21:44Z @neo-gpt cross-referenced by PR #15583
@Ap-0007 - 2026-07-28T13:50:33Z
Sorry to hear that npm run test-unit fails on Windows x64 for you. Could you please provide the complete failure output plus node -v, npm -v, and which shell you used? We'll troubleshoot this issue with you.
👋 New to Neo.mjs? This is a great first issue.
src/util/Matrix.mjsis a small, self-contained matrix-math helper — 4×4 transform matrices for CSSmatrix3d(), rotation generators, and matrix multiplication. It's pure functions and simple class methods: no DOM, no async, no framework internals to learn. Your task is to add a focused unit test that pins its behavior, following the pattern of the util specs already in the repo. It's a self-contained, satisfying way to make your first contribution — and you'll be adding real value: this util backs the transform/animation geometry, and it currently has zero test coverage.What the code does
Neo.util.Matrix(src/util/Matrix.mjs, ~160 lines):static rotateX(t)/rotateY(t)/rotateZ(t)— return a 4×4 rotation matrix (a plain array of arrays) for anglet, usingMath.cos/Math.sin. Pure functions.getElement(i, j)(and its shortcute(i, j)) — returns the 1-indexed element(i, j), ornullwhen the indices are out of bounds.multiply(m)(and its shortcutx(m)) — computesthis × m. Note the contract: it writes the result into the argument'sitemsand returns the argument.getTransformStyle()— emits the CSSmatrix3d(...)string from a 4×4 matrix, each value attoFixed(10)precision.Instances are created with
Neo.create('Neo.util.Matrix', {items: [[...], ...]}).How to get started
test/playwright/unit/util/String.spec.mjsandtest/playwright/unit/util/Function.spec.mjs. Copy the setup shape (thesetup({appConfig})+ imports block) into a newtest/playwright/unit/util/Matrix.spec.mjs.npm run test-unit -- test/playwright/unit/util/Matrix.spec.mjs.Acceptance Criteria
test/playwright/unit/util/Matrix.spec.mjscovering the static rotations,getElement/e,multiply/x, andgetTransformStyle.rotateX/Y/Z: identity matrix att = 0, and thesin/cosplacement is correct for a non-zero angle.getElement: 1-indexed access returns the right element; out-of-bounds returnsnull.multiply/x: verified against a hand-computed product (e.g.[[1,2],[3,4]] × [[5,6],[7,8]] = [[19,22],[43,50]]) — not by re-running the code and copying its output. Identity × M = M is a nice extra check.getTransformStyle: the exactmatrix3d(...)string for a known matrix (e.g. the 4×4 identity).npm run test-unit -- test/playwright/unit/util/Matrix.spec.mjs.Out of Scope
No change to
src/util/Matrix.mjsitself — this is coverage only. (If a test happens to surface a real bug in the util, that's a separate issue — mention it in your PR and we'll take it from there.)Good to know
Sibling coverage issues already completed by the community:
Array(#15124),String(#15118),Json.extract(#15117). Questions are welcome — comment on this issue and a maintainer will help.