Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

HasTaskState says there are no micro and macro tasks but I think there are outstanding tasks. Who is right? #1013

@roomle-build

Description

@roomle-build

Hello!

I wanted to use Zone.js for our project in E2E testing. We don't use Angular so we just wanted to use the raw Zone.js. In our app there are a lot of async tasks and I want every E2E test to wait until all async tasks are finished and then do a cleanup. Zone.js seems to help with this issue, but I can't get it to work. When I wait in onHasTask for hasTaskState.macroTask === false && hasTaskState.microTask === false I encounter situations where it seems that the E2E test finishes more often. I was able to create a small jsfiddle which demonstrates my problem: https://jsfiddle.net/r0sokrvg/5/

I'm not sure if it is an issue that Zone.js sets both hasTaskState.macroTask and hasTaskState.microTask to false but there are still tasks to process. Maybe I'm just using Zone.js wrong. I tried many things but I think I'm missing some important point.

It would be great if someone could help me.

Thanks a lot

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