Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/fixture-root-relative-url/dir-a/source.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<body>
<a href="/dir-b/target.html">dir-b/target</a>
</body>
3 changes: 3 additions & 0 deletions test/fixture-root-relative-url/dir-b/target.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<body>
This page is the target of a link in <samp>../dir-a/source.html</samp>.
</body>
21 changes: 21 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ describe('link checker', () => {
})
})

it('run link checker with root-relative-url fixtures', () => {
return checker(dir('root-relative-url'), {['warn-name-attr']: true}).then(result => {
const expectedErrors = []
const expectedWarnings = []

expect(result.stats.errors).eql(expectedErrors)
expect(result.stats.warnings).eql(expectedWarnings)
expect(result.stats).eql({
parsedFiles: 2,
localLinks: 1,
localAnchorLinks: 0,
remoteLinks: 0,
remoteAnchorLinks: 0,
parentLinks: 0,
parentAnchorLinks: 0,
errors: expectedErrors,
warnings: expectedWarnings
})
})
})

it('run link checker with scaladoc fixtures', () => {
return checker(dir('scaladoc'), {javadoc: true}).then(result => {
const expectedErrors = [ { type: 'page',
Expand Down