To build and test serverless-child-stack-manager, you need to download and install the following applications:
- Node.js, a javascript runtime environment.
- Visual Studio Code for editing and debugging code. Any other editor would work too.
To compile the code, do the following:
- Run
npm install
in the repo root - Run
npm run build
. This runs a linter on the source code (via ESLint), then builds the plugin.
For unit testing, Jasmine is used; tests are written in TypeScript.
To run tests once, use npm test
.
To generate a coverage report, use npm run test:ci
. When done, open ./coverage/index.html
with a browser to view the report.
To debug tests:
- Open sws-platform.code-workspace with Visual Studio Code
- Focus the test you're debugging, as described in Jasmine documentation and set breakpoints where necessary.
- Switch to VSCode's Debug tab and select the Debug Tests (workspace) configuration and run it.