Conversation
| "clean-webpack-plugin": "^4.0.0", | ||
| "css-loader": "^7.1.4", | ||
| "file-loader": "^6.2.0", | ||
| "script-loader": "^0.7.2", |
There was a problem hiding this comment.
| "jest": "^30.0.5", | |
| "jest-environment-jsdom": "^30.0.5", | |
| "script-loader": "^0.7.2", |
jest and jest-environment-jsdom are used by the test script but absent from devDependencies.
so jest --colors will fail with "command not found" in any environment that does not already have GLPI core's ../../node_modules/.bin/jest.
There was a problem hiding this comment.
npm run walks up parent node_modules/.bin dirs automatically, so npm test in plugins/gantt already resolves jest from GLPI core's ../../node_modules/.bin/jest ; same fallback pattern the Makefile already uses for phpunit/phpstan.
CI doesn't even go through npm test: continuous-integration.yml calls the binary directly with an explicit fallback (node_modules/.bin/jest → ../../node_modules/.bin/jest).
Only breaks if you run the plugin fully standalone outside a GLPI checkout ; same limitation already accepted for the PHP tools. So nothing to change.
Checklist before requesting a review
Please delete options that are not relevant.
Description
This adds a Jest test loading the actual built bundle (public/lib/libs.js) and asserting the gantt API surface used by gantt-helper.js is present, so the shared plugin CI catches this class of regression automatically.
The plugin relies on GLPI core's own jest/jest-environment-jsdom install (via the CI's
../../node_modules/.bin/jestfallback), so no new devDependency was added.Screenshots (if appropriate):