Generating a component via Angular CLI creates a .spec file. Should integration and individual tests be included there?
Note that the spec file is actually optional. But in any case, you typically wouldn't want your integration tests combined with your unit tests no matter how you define the seams in your application. That's because they typically run for different reasons, at different times, in different environments. That being said, the only difference between them might be injecting a mock verses using a concrete implementation.
How can I tell if a test is individual or not.
This, and the rest of your questions, depend on where you fall on the testing-purist spectrum and how you relate that to your development reality. For example, Roy Osherove defines a "unit" as:
[a] "unit of work" or a "use case" inside the system.
That implies some amount of integration for any reasonably designed, non-trivial application. One thing's for sure though: if your test relies on a db connection, network availability, API/Service, file system, or any other volatile dependency, it's definitely an integration test.
Answer from ChiefTwoPencils on Stack OverflowGenerating a component via Angular CLI creates a .spec file. Should integration and individual tests be included there?
Note that the spec file is actually optional. But in any case, you typically wouldn't want your integration tests combined with your unit tests no matter how you define the seams in your application. That's because they typically run for different reasons, at different times, in different environments. That being said, the only difference between them might be injecting a mock verses using a concrete implementation.
How can I tell if a test is individual or not.
This, and the rest of your questions, depend on where you fall on the testing-purist spectrum and how you relate that to your development reality. For example, Roy Osherove defines a "unit" as:
[a] "unit of work" or a "use case" inside the system.
That implies some amount of integration for any reasonably designed, non-trivial application. One thing's for sure though: if your test relies on a db connection, network availability, API/Service, file system, or any other volatile dependency, it's definitely an integration test.
The standard practice is to put your individual unit tests in the jasmine spec files side-by-side with your components, directives, services. By default the cli will create these using jasmine and they will be run using the karma test runner.
For integration tests, create these in the e2e folder. These will again use jasmine by default, as well as the Protractor test runner. For the integration tests it is recommended you abstrac out much of the page interactions with page-objects, to keep your tests readable and at a high abstraction level.
Clarification
An integration test will test the integration of your Angular app with other layers such as a Rest or GraphQL backend. If you are looking to test the integration of components within the angular application, this would be a "deep unit" as long as it does not require any fixtures outside of the frontend app. If this deep unit test is what you are looking for, place these in spec files and run with your unit tests.