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 not 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
|
- |
31 |
constructor
|
- |
2 |
should have valid url field value after initialization
|
- |
|
should have valid options field value after initialization
|
- |
|
isNeedToSkipUrl
|
- |
29 |
protocols criteria
|
- |
2 |
should skip url with non-accepted schema
|
- |
|
should pass url with accepted schema
|
- |
|
external criteria
|
- |
4 |
should pass external url if "checkExternalUrls" is set to true
|
- |
|
should skip external url if "checkExternalUrls" is set to false
|
- |
|
should pass internal url if "checkExternalUrls" is set to true
|
- |
|
should pass internal url if "checkExternalUrls" is set to false
|
- |
|
excluded urls criteria
|
- |
11 |
should pass url if it does not matches any regular expression
|
- |
|
should skip url if it does matches at least one of regular expressions
|
- |
|
should skip url if it equal to one of blacklisted urls
|
- |
|
should skip url if it matches to "http://my.site.com/foo/*"
|
- |
|
should skip url if it matches to "http://my.site.com/*/bar"
|
- |
|
should skip url if it matches to "http://my.site.com/*"
|
- |
|
should skip url if it matches to "*/foo/bar"
|
- |
|
should skip url with anchor if it equal to one of to one of blacklisted urls
|
- |
|
should skip url with anchor if it matches to "http://my.site.com/foo/*#a"
|
- |
|
should skip url with anchor if it matches to "http://my.site.com/*/bar#a"
|
- |
|
should pass url if it does not matches on any blacklisted urls
|
- |
|
mode criteria
|
- |
6 |
mode "page"
|
- |
2 |
should pass url if url of page where it is equals to root page
|
- |
|
should skip url if url of page where it does not equal to root page
|
- |
|
mode "section"
|
- |
4 |
should pass url it is child against to root page
|
- |
|
should pass url it is sibling to root page
|
- |
|
should pass url it is parent to root page
|
- |
|
should skip url it from another section of website
|
- |
|
complex
|
- |
6 |
should skip "mailto://my.site.com/url1"
|
- |
|
should skip "http://google.com"
|
- |
|
should pass "http://my.site.com/url1"
|
- |
|
should skip "http://my.site.com/foo1"
|
- |
|
should pass "https://my.site.com/url1"
|
- |
|
should skip "mailto://my.site.com/foo2"
|
- |
|
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
|
- |
|