After runned my test with this artist-detail.spec.ts
import { HttpClientModule } from '@angular/common/http';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterModule } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { ArtistDetailComponent } from './artist-detail.component';
describe('ArtistDetailComponent', () => {
let component: ArtistDetailComponent;
let fixture: ComponentFixture<ArtistDetailComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule,
RouterModule,
HttpClientModule
],
declarations: [ ArtistDetailComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ArtistDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
I have got this output
27 04 2022 18:23:06.651:INFO [launcher]: Starting browser ChromeHeadless 27 04 2022 18:23:09.795:INFO [Chrome Headless 100.0.4896.127 (Linux x86_64)]: Connected on socket iATQ5FHffdjRWSTWAAAB with id 92608559 Chrome Headless 100.0.4896.127 (Linux x86_64) ERROR: 'DEPRECATION: describe with no children (describe() or it()) is deprecated and will be removed in a future version of Jasmine. Please either remove the describe or add children to it. Error: at at Env.jasmineEnv. [as describe] (http://localhost:9876/karma_webpack/webpack:/node_modules/zone.js/fesm2015/zone-testing.js:454:1) at at Object.4911 (http://localhost:9876/karma_webpack/webpack:/src/app/modules/artist/artist-detail/artist-detail.component.spec.ts:8:1) at webpack_require (http://localhost:9876/karma_webpack/webpack:/webpack/bootstrap:19:1) Note: This message will be shown only once. Set the verboseDeprecations config property to true to see every occurrence.' Chrome Headless 100.0.4896.127 (Linux x86_64) ERROR: 'DEPRECATION: describe with no children (describe() or it()) is deprecated and will be removed in a future version of Jasmine. Please either remove the describe or add children to it. Error: at at Env.jasmineEnv. [as describe] (http://localhost:9876/karma_webpack/webpack:/node_modules/zone.js/fesm2015/zone-testing.js:454:1) at at Object.4911 (http://localhost:9876/karma_webpack/webpack:/src/app/modules/artist/artist-detail/artist-detail.component.spec.ts:8:1) at webpack_require (http://localhost:9876/karma_webpack/webpack:/webpack/bootstrap:19:1) Note: This message will be shown only once. Set the verboseDeprecations config property to true to see every occurrence.' Chrome Headless 100.0.4896.127 (Linux x86_64) ERROR: 'DEPRECATION: describe with no children (describe() or it()) is deprecated and will be removed in a future version of Jasmine. Please either remove the describe or add children to it. Error: at at Env.jasmineEnv. [as describe] (http://localhost:9876/karma_webpack/webpack:/node_modules/zone.js/fesm2015/zone-testing.js:454:1) at at Object.4911 (http://localhost:9876/karma_webpack/webpack:/src/app/modules/artist/artist-detail/artist-detail.component.spec.ts:8:1) at webpack_require (http://localhost:9876/karma_webpack/webpack:/webpack/bootstrap:19:1) Note: This message will be shown only once. Set the verboseDeprecations config property to true to see every occurrence.' ExhibitionDetailComponent ā should create
How can I fix the issue ERROR: 'DEPRECATION'
Thanks a lot