Skip to content

ESM coverage: async parent executing after rejection in different branch of a graph #4864

@nicolo-ribaudo

Description

@nicolo-ribaudo

I don't see tests for this, and I'm getting different results across different browsers.

Test case:

// entrypoint
import("./foo.js").then(console.log.bind(console, "RES"), console.log.bind(console, "REJ"));
// foo.js
import "./a.js";
import "./b.js";
// a.js
import "./c.js";
console.log("RUNNING a.js");
// c.js
await new Promise(res => setTimeout(res, 1000));
// b.js
throw new Error("b.js failed to run");

The expected behavior is that we first reject the dynamic import promise logging the error from b.js, and then after 1 second we log RUNNING a.js.

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