Skip to content

Documentation: await all unsettled promises after Context.Run #202

@viceice

Description

@viceice

How do I await all unsettled promises after Context.Run()?

js code

(async () => {
  await Promise.resolve();
  throw new Error('test');
})();

console.log('after');

cs code

var ctx = new Context();
ctx.Eval("<js code>");
// ctx.WaitForPromises() -> should throw on unhandled rejections

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions