Command-line tool to assess the testability of JS and TS code
npm install js-testability-score
npm i js-testability-score
`
Usage
Verify the installation by running the following command in your project directory
`
npx jsts --version
`
To get help run
`
npx jsts --help
`
The tool expects a path to a directory in which it should search for files to analyze. The path can be relative to your project directory or absolute.
Example of a relative path
`
npx jsts dir/subdir
`
Example of an absolute path
`
npx jsts C:/dir/project
`
To scan your whole project directory, use
`
npx jsts /
`
By default, the console output only contains scores for the analyzed files. You can additionally output scores for the computed metrics and their actual values by adding --metrics`. Make sure your console's width is sufficient to display the data.