I have seen this and this posts and they have made me understand tsconfig.app.json and tsconfig.json.
I have an angular app which has tsconfig.app.json, tsconfig.json and tsconfig.spec.json
What is the role of tsconfig.spec.json? What does the 'spec' in tsconfig.spec.json stand for?
Similarly, the tsconfig. spec. json file is used for testing and sets "types": ["jasmine"] to allow using Jasmine's ambient declarations in tests.
json description. name. Specifies the name of the extension. The name can contain alphanumeric characters, underscores ( _ ), and spaces ( ).
It is TypeScript configuration for the application tests.
For example below code you says
"types": ["jasmine", "node"]
I will use jasmine for testing on nodejs environment.
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"module": "commonjs",
"target": "es5",
"baseUrl": "",
"types": [
"jasmine",
"node"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With