Need to create unit testcase using jasmine marble in withLatestFrom

64 Views Asked by At

I am completely new at doing unit testing using jasmine-marble.

I have a component, with the following code:

getData() : void {
  this.firstObservableClass.pipe(withLatestFrom(this.secObservableClass))
    .subscribe(([firstObservResult, secObserveResult]) => {
       // expected subscription results are true and true
    });
}

I the spec I have:

const expected = cold('(cd|)', { c: true,d: true});
expect(app.getData).toBeObservable(expected)

And getting an error while running ng test:

Expected $.length = 1 to equal 4.
Expected $[0].notification.kind = 'N' to equal 'C'.
0

There are 0 best solutions below