Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 1.17 KB

DEVELOPERS.md

File metadata and controls

29 lines (17 loc) · 1.17 KB

Building and Testing serverless-git-info

Prerequisite Software

To build and test serverless-git-info, 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.

Building

To compile the code, do the following:

  1. Run npm install in the repo root
  2. Run npm run build. This runs a linter on the source code (via ESLint), then builds the plugin.

Running and debugging unit tests

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:

  1. Open serverless-git-info.code-workspace with Visual Studio Code
  2. Focus the test you're debugging, as described in Jasmine documentation and set breakpoints where necessary.
  3. Switch to VSCode's Debug tab and select the Debug Tests (workspace) configuration and run it.