This is a nearly minimal setup for coding a kata in Typescript. It uses NPM as a package manager, Jest as the test framework and has the Typescript version of StandardJS installed for formatting and linting.
These installation instructions assume that you already have git and a current version of NPM installed.
Clone the repository using git:
Then install with npm install
.
For the most basic use, simply add functions to kata.ts
, and import them in kata.test.ts
for testing. Additional files may be created. Jest will automatically run tests in any file inside the src directory ending in .test.ts
.
Use the command npm run test
to run all Jest tests from the terminal.
If you need to build the code separately from running tests, use npm run build
to output files and source maps to the ./build
directory.