I have a test folder in which there are 3 files,
1)nav-bar.init.spec.ts
2)nav-bar.scaffold.ts
3)nav-bar.spec.ts
I have the following codes respectively,
In nav-bar.init.spec.ts,
import { TestBed, async } from '@angular/core/testing';
import { Navbarcomponent } from './app.component';
describe('Navbarcomponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
Navbarcomponent
],
}).compileComponents();
}));
In nav-bar.spec.ts,
import { TestBed, async } from'@angular/core/testing';
import { Navbarcomponent } from './app.component';
describe('Navbarcomponent', () => {
let component: Navbarcomponent;
beforeEach(() => {
component = new Navbarcomponent();
}));
it (should create,()=>{
expect(conponent).toBeTruthy()
}); //// I added this test case here
When I run the test cases,the karma screen shows 'NO SPEC FOUND'
My Karma.config file, karma-config-1
[karma-config-2][2]
I am confused with this modularity. Can anyone please suggest me help.Thanks.