Skip to content

expect(iterable).toEqual([1, 2, 3])? #8680

Closed
@jablko

Description

@jablko

Why doesn't the following pass?

function* iterable() {
  yield 1;
  yield 2;
  yield 3;
}
expect(iterable()).toEqual([1, 2, 3]);

I get:

Expected: [1, 2, 3]
Received: {}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions