Skip to content

plannedWork/scraper.js and plannedWork/crawler.js needs to be refactored before unit tests can be added #40

@geoffreyyip

Description

@geoffreyyip

Proposal: break files up, so there are exposed APIs for unit testing.

Right now, plannedWork/crawler.js has one exposed method that invokes five other methods together in complex nested logic. It's essentially a god class.

The underlying logic is brittle and heavily coupled. Separating the methods that build links from the methods that generate a list of route-date pairs from the page request from the parsing from the formatting for return will be necessary before any useful tests can be added.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions