jeudi 8 février 2018

Test method setter @Input() Angular 4 Karma

How can I test this method from the component:

@Input() set camera(camera: CameraModel) {
    this._camera = camera;
    if (this._camera && this._camera.cameraId) {
        this.fetchVideos(this._camera);
    }
}

In the test, you need to give him my stub, but as I have not tried, it does not work...

Aucun commentaire:

Enregistrer un commentaire