Skip to content

refactor: port CI broken-link-checker from CLI to node file #721

@darcywong00

Description

@darcywong00

From #719 (comment)

Initial implementation in #719 was to port the broken-link-checker test to blc_test.mjs so that we can programmatically exclude non-en locales, and also long-term the .mjs would be more maintainable long-term

(Another area we could exclude is the /downloads/releases for every single release)

Affects ci.yml and build.sh test

Capturing initial PR description for posterity:

Options mapping:

CLI options
--recursive recursive: true
--ordered maintainLinkOrder: true
---host-requests 50 maxSocketsPerHost: 50
-e excludeExternalLinks: true (this is a also a test parameter)
--filter-level 3 filterLevel: 3

Usage:

node blc_test.mjs | tee ../blc.log

I also had to specify node dependency bhttp": "1.2.8" to patch a TypeError that would get thrown

TypeError: Cannot assign to read only property 'response' of object '[object Object]'
    at addErrorData (/home/darcy/src/sites/keyman.com/node_modules/bhttp/lib/bhttp.js:159:16)
    at ClientRequest.<anonymous> (/home/darcy/src/sites/keyman.com/node_modules/bhttp/lib/bhttp.js:567:25)

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Refactor.

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions