Skip to content

[mock] relayStylePaginationMock sometimes returns an incorrect value for hasNextPage #5890

Open
@croaker

Description

@croaker

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a reproduction available on GitHub here
  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

hasNextPage is erroneously false on the second-to-last page if the last page only contains a single node.

To Reproduce Steps to reproduce the behavior:

Insert expect(page2Items.pageInfo.hasNextPage).toBeTruthy(); above line 103 in packages/mock/tests/pagination.spec.ts. After this change, the test fails because page2Items.pageInfo.hasNextPage is erroneously false at this point.

Pull Request: #5891

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