All workflows are executed from the repo root:
-
Installing dependencies:
npm install
-
Building:
npm run build -w @ni/xliff-to-json-converter
-
Linting:
npm run lint -w @ni/xliff-to-json-converter
-
Formatting:
npm run format -w @ni/xliff-to-json-converter
-
Packing the package:
npm run pack -w @ni/xliff-to-json-converter
To build and run tests locally, run npm run tdd -w @ni/xliff-to-json-converter
. To run tests without rebuilding, run npm run test -w @ni/xliff-to-json-converter
.
Tests execute using Jasmine's built in test runner (note that unlike most JavaScript/TypeScript projects at NI it doesn't use karma as that is a browser execution environment but this is a Node.js project).
To debug tests:
- Open the source in VSCode.
- (Optional) Focus the test of interest by changing
it
tofit
. - Ensure the project has been built.
- Set a breakpoint in a test or source file under the
dist
directory by clicking in the gutter to the left of the line. - Open
package.json
, click the▷Debug
button above thescripts
section and select thetest
command. - The tests will run using VSCode's debugger.