🐞 Bug report
Describe the bug
Running make test or make integration-tests in a hook folder does not install npm depencies from /tests/integration. The CI does this step manually.
Steps To Reproduce
git clone https://github.com/secureCodeBox/secureCodeBox.git
cd hooks/cascading-scans
make test
Expected behavior
Integration tests should work
Screenshots / Logs
> @securecodebox/hook-cascading-scans@1.0.0 build
> npx tsc hook.ts --sourceMap --esModuleInterop
FAIL integration-tests/cascade-nmap-ncrack.test.js
● Test suite failed to run
Cannot find module '@kubernetes/client-node' from '../../../tests/integration/helpers.js'
Require stack:
/tmp/secureCodeBox/tests/integration/helpers.js
integration-tests/cascade-nmap-ncrack.test.js
3 | // SPDX-License-Identifier: Apache-2.0
4 |
> 5 | const k8s = require("@kubernetes/client-node");
| ^
6 |
7 | const kc = new k8s.KubeConfig();
8 | kc.loadFromDefault();
at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:324:11)
at Object.<anonymous> (../../../tests/integration/helpers.js:5:13)
Fix
Run npm ci in /tests/integration
🐞 Bug report
Describe the bug
Running
make testormake integration-testsin a hook folder does not install npm depencies from/tests/integration. The CI does this step manually.Steps To Reproduce
Expected behavior
Integration tests should work
Screenshots / Logs
Fix
Run
npm ciin/tests/integration