GoogleChrome / webdev-infra

Apache License 2.0
37 stars 28 forks source link

feat: implement url-crawl utility #58

Closed Blazzike closed 1 year ago

Blazzike commented 1 year ago

Part of #46

Implements a UrlCrawl class (utils/url-crawl.js) with the following usage:

new UrlCrawl(/* options */).go().then((result) => result.summaryToConsole());

The above code would stdout something along the lines of the following when executed:

404 Not Found a[href="/404-path"] @ /source-page/
=== Summary ===
Scanned 24 URLs in 0.1s

Error Summary
  404 Not Found: 1

Totals
  Errors: 1
  Pass: 23