How to write test case in Jest to handle rxjs 'delay' between two API calls

Discussão em 'Angular' iniciado por Ashwini, Janeiro 21, 2025.

  1. Ashwini

    Ashwini Guest

    I have a function with chained api calls. I have added rxjs delay between two API calls.

    How to write test case in Jest to handle delay between two API calls.

    Sequence of APIs

    1. first API call
    2. after switchMap call delay of 5000.
    3. Call Next API
    4. switchMap further conditional code to check conditions

    Continue reading...

Compartilhe esta Página