Every unit test file should be placed next to the file it tests with the same name and the
.spec.ts extension. If this extension is not present then the file won't be executed when running the test commands.
This command builds and executes the unit tests. If you modify a file and save it, the code is rebuilt and the tests are run again. This is particularly useful in development: you do not need to re-run the command every time you make code changes.
The process runs forever until you stop it.
If you need to build and run the tests only once, you can use these two commands:
These commands are particularly useful when you want to integrate your tests into a CI pipeline or a Git hook.
FoalTS uses dependency injection to keep the code loosely coupled and so enhance testatibility.