Home > front end >  What is dot spec `.spec.ts` and why do typescript tests use them?
What is dot spec `.spec.ts` and why do typescript tests use them?

Time:10-25

I haven't seen an example where a typescript project doesn't use .spec.ts for their tests.

So why even both putting .spec.ts? What is the purpose of .spec.ts?

CodePudding user response:

Their purpose is to identify test files in Angular applications. This it not a standard, just an Angular naming convention which allows test files to be in the same folder as the corresponding file to be tested.

  • Related