Skip to content

unnecessary async act in examples? #6

Description

@httnn

is the async act really needed in this case?

expect(el.innerHTML).toBe("");
await act(async () => {
  resolve(42);
});
expect(el.innerHTML).toBe("42");

since you are not awaiting for the result of resolve or returning it, it seems like a normal non-async act might work here.

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