I'm currently working on an Angular project utilizing the NZ-Zorro library, and I'm encountering difficulty understanding which parameters are causing issues with NzModalRef when attempting to run the test code coverage. The error message displayed is as follows:
Error: NG0204: Can't resolve all parameters for NzModalRef: (?, ?, ?).
Below is my .spec file setup:
import { NzNotificationService } from 'ng-zorro-antd/notification';
import { MinistryService } from './../../ministry.service';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {
NzModalModule,
NzModalService,
NzModalRef,
} from 'ng-zorro-antd/modal';
import { MembersService } from '../../members.service';
import { ComponentFixture } from '@angular/core/testing';
import {
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import {
UntypedFormBuilder,
UntypedFormGroup,
Validators,
FormsModule,
} from '@angular/forms';
import { TestBed } from '@angular/core/testing';
import { HttpClient } from '@angular/common/http';
import { FormNewMemberComponent } from './form-new-member.component';
import { ReactiveFormsModule } from '@angular/forms';
describe('FormNewMemberComponent', () => {
// Test component setup
});
Here's my .ts file snippet:
import { NzModalRef } from 'ng-zorro-antd/modal';
// Other imports...
@Component({
selector: 'app-form-new-member',
templateUrl: './form-new-member.component.html',
styleUrls: ['./form-new-member.component.scss'],
})
export class FormNewMemberComponent implements OnInit {
// Class definition...
}
Additionally, here's my service, module, and additional details that might help you provide guidance to resolve the issue I'm facing. Any assistance would be greatly appreciated. Thank you!