Skip to content

Add testing for fetching journals across multiple pages #6

Description

@dsingleton

Behaviour was added in 5f68d90.

Couldn't work out the testing approach quickly, but shipped the working feature. Needs some tests adding retroactively.

I tried using sinon to stub the request dependency, but ran in to issues with needing it to yield different values each time - stubbing the response of the first page meant it continually parsed the first page, requested the second, received the first again and repeated forever.

Feels like the right approach is to refactor the fetcher to make the testing easier, possibly to avoid it being aware of request at all.

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