BrokenLinksChecker
|
- |
21 |
should simply check given url
|
- |
|
should simply check broken url (404)
|
- |
|
should simply check broken url (500)
|
- |
|
should skip links without href attributes
|
- |
|
should not check same url twice (absolute url)
|
- |
|
should not check same url twice (relative url)
|
- |
|
should use pending queue for small concurrency
|
- |
|
custom timeout option value
|
- |
2 |
should mark url as broken if timeout was occur
|
- |
|
should mark url as valid if timeout is greater then server response time
|
- |
|
custom requestRetriesAmount option value
|
- |
2 |
should mark url as broken if timeout was occur for all attempts
|
- |
|
should mark url as valid if it was checked from second attempt
|
- |
|
custom acceptedSchemes option value
|
- |
2 |
should not check urls with another schemes
|
- |
|
should check urls with schemes from array of acceptedSchemes
|
- |
|
custom requestHeaders option value
|
- |
2 |
should mark url as broken in case of not accessible request headers
|
- |
|
should check url in case of accessible request headers
|
- |
|
custom excludeLinkPatterns option
|
- |
1 |
should not check excluded urls
|
- |
|
check external urls
|
- |
5 |
should not check external link
|
- |
|
should check external link
|
- |
|
should check and mark broken external link
|
- |
|
should mark url as broken if timeout was occur for all attempts
|
- |
|
should mark url as valid if it was checked from second attempt
|
- |
|
acts/config
|
- |
3 |
should create configuration directory
|
- |
|
should create configuration stub
|
- |
|
should create configuration file
|
- |
|
acts/run
|
- |
4 |
should throw error if config param was not set
|
- |
|
should throw error if config file is missed
|
- |
|
execute run action
|
- |
2 |
with default params
|
- |
|
with custom params
|
- |
|
based-option
|
- |
3 |
should get valid option value
|
- |
|
setOption
|
- |
2 |
should set option value for given option name
|
- |
|
should set default value if option was not set
|
- |
|
checker
|
- |
13 |
should have default onDone handler
|
- |
|
constructor
|
- |
9 |
should be initialized with default params if options were not set
|
- |
|
should be initialized with default params if options are empty
|
- |
|
should override default concurrent option
|
- |
|
should override default requestHeaders option
|
- |
|
should override default requestRetriesAmount option
|
- |
|
should override default requestTimeout option
|
- |
|
should override default acceptedSchemes rule
|
- |
|
should override default checkExternalUrls option
|
- |
|
should override default excludeLinkPatterns rule
|
- |
|
start
|
- |
2 |
should throw error if url param was not set
|
- |
|
should throw error if url param has invalid format
|
- |
|
_getRequestOptions
|
- |
1 |
should return valid request options object
|
- |
|
LinkAnalyzer
|
- |
17 |
constructor
|
- |
2 |
should have valid _url field value after initialization
|
- |
|
should have valid _options field value after initialization
|
- |
|
_skipNonAcceptableProtocols
|
- |
2 |
should return true if scheme of given url does not exist in list of acceptable acceptedSchemes
|
- |
|
should return false if scheme of given url exists in list of acceptable acceptedSchemes
|
- |
|
_skipExternalUrls
|
- |
3 |
should return false if checkExternalUrls option is set to true
|
- |
|
should return true if host of given url is different then host of initial url
|
- |
|
should return false if host of given url is the same as host of initial url
|
- |
|
_skipExcludedUrls
|
- |
3 |
should return false in case of empty "excludeLinkPatterns" array
|
- |
|
should return false if any of excluded patterns does not match given url
|
- |
|
should return true if any excluded patterns matches on given url
|
- |
|
_skipOnMode
|
- |
6 |
should return false for mode "page" and direct links of target page
|
- |
|
should return true for mode "page" and non-direct links of target page
|
- |
|
should return false for mode "section" and sub-links of initial link
|
- |
|
should return false for mode "section" and sibling of initial link
|
- |
|
should return false for mode "section" and parent of initial link
|
- |
|
should return true for mode "section" and page outside of section
|
- |
|
isNeedToSkipUrl
|
- |
1 |
test/src/link-analyzer.test.js |
- |
|
broken
|
- |
9 |
constructor
|
- |
1 |
should initialize empty broken urls model after initialization
|
- |
|
add
|
- |
1 |
should add broken links model item to list of broken links
|
- |
|
getAll
|
- |
1 |
should return all broke link items from model
|
- |
|
getByCode
|
- |
3 |
should return valid set of broken link items by given status code
|
- |
|
should return valid set of broken link items by status code 404
|
- |
|
should return valid set of broken link items by status code 500
|
- |
|
clear
|
- |
2 |
should return instance of BrokenUrls class
|
- |
|
should clear broken link items model
|
- |
|
create
|
- |
1 |
should create BrokenUrls instance by static method
|
- |
|
document
|
- |
7 |
should have res getter
|
- |
|
should have url getter
|
- |
|
should have $ getter
|
- |
|
should resolve link url based on _url
|
- |
|
constructor
|
- |
3 |
should set value to _res field
|
- |
|
should set value to _url field
|
- |
|
should set value to _$ field
|
- |
|
statistic
|
- |
11 |
should increase internal count
|
- |
|
should increase external count
|
- |
|
should return valid internal count value
|
- |
|
should return valid external count value
|
- |
|
should return valid count of all processed urls
|
- |
|
should return broken links model
|
- |
|
should return valid result of getBrokenCount method
|
- |
|
should return instance of Statistic class by create static method
|
- |
|
__constructor
|
- |
3 |
should have zero _countExternal value after initialization
|
- |
|
should have zero _countInternal value after initialization
|
- |
|
should have empty broken links model after initialization
|
- |
|
Reporters
|
- |
3 |
Base
|
- |
3 |
should create reports folder
|
- |
|
should create report folder for given config name
|
- |
|
should save report file
|
- |
|
Util
|
- |
3 |
should can be initialized
|
- |
|
should return valid path to configuration folder
|
- |
|
should return valid path to reports folder
|
- |
|