test: npm test never runs shared/apimart.test.js or src/apimartClient.test.js, and no workflow runs tests at all
The test script globs one directory, so two of the seven test files in the repository are not executed by npm test:
"test": "node --test api/_lib/*.test.js"Not covered:
shared/apimart.test.js— 6 testssrc/apimartClient.test.js— 6 tests
Both are reachable only through the separate test:apimart script, which lists its four input files by hand, so a contributor has to already know it exists. Measured on main at 073d105d4dbb3f3afcd2e7cd194cee3a557b0999:
$ npm test -> 40 tests, 0 fail
$ node --test shared/apimart.test.js src/apimartClient.test.js
-> 12 tests, 0 failAll 12 pass, so this is reachability rather than a latent failure — but nothing currently protects them from breaking.
Compounding it, the only workflow in .github/workflows is publish-style-skill.yml, which runs on gpt-image-2-style-library-v* tags to publish the skill. No workflow runs npm test or npm run test:apimart on push or pull request, so none of the 52 tests are executed automatically.
Suggested fix
Widen the test glob to cover the directories that hold tests (shared/*.test.js, src/*.test.js), and consider a workflow that runs npm test on pull requests. Adding CI is a maintainer decision, so it is not part of the linked change.
Linked change
#45 widens the glob only.
Source: freestylefly/awesome-gpt-image-2