Skip to content

How to mock distinctUntilChanged in an angular app #84

@tomavic

Description

@tomavic

Is your feature request related to a problem? Please describe.
I need to mock the following:

  getListOfItems() {
    // When Filter or Language changes
    return merge(
      this.translate.onLangChange,
      this.storeService.filtration$.pipe(
        distinctUntilChanged(
          (prev, curr) =>
            prev.searchKey === curr.searchKey &&
            prev.pageNumber === curr.pageNumber &&
            prev.pageSize === curr.pageSize &&
            prev.filterKey === curr.filterKey
        )
      )
    ).pipe(switchMap(() => this.getBundlesList()));
  }

Additional context
Angular app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions