feat(core): make broken link checker detect broken anchors - add onBrokenAnchors
config
#4066
Annotations
32 errors
getDocusaurusAliases › returns appropriate webpack aliases:
packages/docusaurus/src/webpack/aliases/__tests__/index.test.ts#L186
expect(received).resolves.toMatchSnapshot()
Snapshot name: `getDocusaurusAliases returns appropriate webpack aliases 1`
- Snapshot - 0
+ Received + 1
@@ -10,10 +10,11 @@
"@docusaurus/Translate": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/Translate.tsx",
"@docusaurus/constants": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/constants.ts",
"@docusaurus/isInternalUrl": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/isInternalUrl.ts",
"@docusaurus/renderRoutes": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/renderRoutes.ts",
"@docusaurus/router": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/router.ts",
+ "@docusaurus/useAnchor": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useAnchor.ts",
"@docusaurus/useBaseUrl": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useBaseUrl.ts",
"@docusaurus/useDocusaurusContext": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useDocusaurusContext.ts",
"@docusaurus/useGlobalData": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useGlobalData.ts",
"@docusaurus/useIsBrowser": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useIsBrowser.ts",
"@docusaurus/useIsomorphicLayoutEffect": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useIsomorphicLayoutEffect.tsx",
at Object.toMatchSnapshot (node_modules/expect/build/index.js:174:22)
at Object.toMatchSnapshot (packages/docusaurus/src/webpack/aliases/__tests__/index.test.ts:186:52)
|
handleBrokenLinks › do not report anything for correct paths:
packages/docusaurus/src/server/__tests__/brokenLinks.test.ts#L172
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 0
Received number of calls: 1
at Object.toHaveBeenCalledTimes (packages/docusaurus/src/server/__tests__/brokenLinks.test.ts:172:25)
|
handleBrokenLinks › reports all broken links:
packages/docusaurus/src/server/__tests__/brokenLinks.test.ts#L185
expect(received).rejects.toThrowErrorMatchingSnapshot()
Snapshot name: `handleBrokenLinks reports all broken links 1`
- Snapshot - 13
+ Received + 26
@@ -2,30 +2,43 @@
Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist.
Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.
Exhaustive list of all broken links found:
-
- - On source page path = /docs/good doc with space:
- -> linking to ./some%20other%20non-existent%20doc1 (resolved as: /docs/some%20other%20non-existent%20doc1)
- -> linking to ./break%2F..%2F..%2Fout2 (resolved as: /docs/break%2F..%2F..%2Fout2)
-
- - On source page path = /docs/goodDoc:
+ - On source page path = /docs/good doc with space:
+ -> linking to ./another%20good%20doc%20with%20space (resolved as: /docs/another%20good%20doc%20with%20space)
+ -> linking to ./weird%20but%20good (resolved as: /docs/weird%20but%20good)- Anchor On source page path = /docs/good doc with space:
+ -> linking to ./some%20other%20non-existent%20doc1 (resolved as: /docs/some%20other%20non-existent%20doc1)
+ -> linking to ./break%2F..%2F..%2Fout2 (resolved as: /docs/break%2F..%2F..%2Fout2)
+ - On source page path = /docs/goodDoc:
+ -> linking to ./anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to /docs/anotherGoodDoc?someQueryString=true#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc?someQueryString=true (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /docs/goodDoc:
-> linking to ../anotherGoodDoc#reported-because-of-bad-relative-path1 (resolved as: /anotherGoodDoc)
-> linking to ./docThatDoesNotExist2 (resolved as: /docs/docThatDoesNotExist2)
-> linking to ./badRelativeLink3 (resolved as: /docs/badRelativeLink3)
-> linking to ../badRelativeLink4 (resolved as: /badRelativeLink4)
-
- - On source page path = /community:
+ - On source page path = /community:
+ -> linking to /docs/goodDoc
+ -> linking to /docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ./docs/goodDoc#someHash (resolved as: /docs/goodDoc)
+ -> linking to ./docs/anotherGoodDoc (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /community:
-> linking to /someNonExistentDoc1
-> linking to /badLink2
-> linking to ./badLink3 (resolved as: /badLink3)
-
- - On source page path = /page1:
+ - Anchor On source page path = /page1:
-> linking to /link1
+ -> linking to /files/hey.html
+ -> linking to /javadoc
+ -> linking to /files/hey
+ -> linking to /javadoc/index.html
+ -> linking to /javadoc/index.html#foo (resolved as: /javadoc/index.html)
-> linking to /emptyFolder
-
- - On source page path = /page2:
+ - Anchor On source page path = /page2:
-> linking to /docs/link2
-> linking to /emptyFolder/
- -> linking to /hey/link3
+ -> linking to /javadoc/
+ -> linking to /hey/link3
+ -> linking to /javadoc/index.html
+ -> linking to /files/file.zip
↵
at Object.toThrowErrorMatchingSnapshot (node_modules/expect/build/index.js:218:22)
at Object.toThrowErrorMatchingSnapshot (packages/docusaurus/src/server/__tests__/brokenLinks.test.ts:185:15)
|
handleBrokenLinks › reports frequent broken links:
packages/docusaurus/src/server/__tests__/brokenLinks.test.ts#L224
expect(received).rejects.toThrowErrorMatchingSnapshot()
Snapshot name: `handleBrokenLinks reports frequent broken links 1`
- Snapshot - 11
+ Received + 24
@@ -9,40 +9,53 @@
Frequent broken links are linking to:
- /frequent
- ./maybe-not
Exhaustive list of all broken links found:
-
- - On source page path = /docs/good doc with space:
+ - On source page path = /docs/good doc with space:
+ -> linking to ./another%20good%20doc%20with%20space (resolved as: /docs/another%20good%20doc%20with%20space)
+ -> linking to ./weird%20but%20good (resolved as: /docs/weird%20but%20good)- Anchor On source page path = /docs/good doc with space:
-> linking to ./some%20other%20non-existent%20doc1 (resolved as: /docs/some%20other%20non-existent%20doc1)
-> linking to ./break%2F..%2F..%2Fout2 (resolved as: /docs/break%2F..%2F..%2Fout2)
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /docs/maybe-not)
-
- - On source page path = /docs/goodDoc:
+ - On source page path = /docs/goodDoc:
+ -> linking to ./anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to /docs/anotherGoodDoc?someQueryString=true#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc?someQueryString=true (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /docs/goodDoc:
-> linking to ../anotherGoodDoc#reported-because-of-bad-relative-path1 (resolved as: /anotherGoodDoc)
-> linking to ./docThatDoesNotExist2 (resolved as: /docs/docThatDoesNotExist2)
-> linking to ./badRelativeLink3 (resolved as: /docs/badRelativeLink3)
-> linking to ../badRelativeLink4 (resolved as: /badRelativeLink4)
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /docs/maybe-not)
-
- - On source page path = /community:
+ - On source page path = /community:
+ -> linking to /docs/goodDoc
+ -> linking to /docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ./docs/goodDoc#someHash (resolved as: /docs/goodDoc)
+ -> linking to ./docs/anotherGoodDoc (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /community:
-> linking to /someNonExistentDoc1
-> linking to /badLink2
-> linking to ./badLink3 (resolved as: /badLink3)
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /maybe-not)
-
- - On source page path = /page1:
+ - Anchor On source page path = /page1:
-> linking to /link1
+ -> linking to /files/hey.html
+ -> linking to /javadoc
+ -> linking to /files/hey
+ -> linking to /javadoc/index.html
+ -> linking to /javadoc/index.html#foo (resolved as: /javadoc/index.html)
-> linking to /emptyFolder
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /maybe-not)
-
- - On source page path = /page2:
+ - Anchor On source page path = /page2:
-> linking to /docs/link2
-> linking to /emptyFolder/
- -> linking to /hey/link3
+ -> linking to /javadoc/
+ -> linking to /hey/link3
+ -> linking to /javadoc/index.html
+ -> linking to /files/file.zip
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /maybe-not)
↵
at Object.toThrowErrorMatchingSnapshot (node_modules/expect/build/index.js:218:22)
at Object.toThrowErrorMatchingSnapshot (packages/docusaurus/src/server/__tests__/brokenLinks.test.ts:224:15)
|
loadSiteConfig › website with valid siteConfig:
packages/docusaurus/src/server/__tests__/config.test.ts#L18
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid siteConfig 1`
- Snapshot - 0
+ Received + 1
@@ -25,10 +25,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:18:20)
|
loadSiteConfig › website with ts + js config:
packages/docusaurus/src/server/__tests__/config.test.ts#L30
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with ts + js config 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"plugins": [],
"presets": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:30:20)
|
loadSiteConfig › website with .cjs siteConfig:
packages/docusaurus/src/server/__tests__/config.test.ts#L38
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with .cjs siteConfig 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"plugins": [],
"presets": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:38:20)
|
loadSiteConfig › website with valid config creator function:
packages/docusaurus/src/server/__tests__/config.test.ts#L47
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid config creator function 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:47:20)
|
loadSiteConfig › website with valid async config:
packages/docusaurus/src/server/__tests__/config.test.ts#L56
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid async config 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:56:20)
|
loadSiteConfig › website with valid async config creator function:
packages/docusaurus/src/server/__tests__/config.test.ts#L65
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid async config creator function 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:65:20)
|
Tests (20)
The job was canceled because "_18" failed.
|
getDocusaurusAliases › returns appropriate webpack aliases:
packages/docusaurus/src/webpack/aliases/__tests__/index.test.ts#L186
expect(received).resolves.toMatchSnapshot()
Snapshot name: `getDocusaurusAliases returns appropriate webpack aliases 1`
- Snapshot - 0
+ Received + 1
@@ -10,10 +10,11 @@
"@docusaurus/Translate": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/Translate.tsx",
"@docusaurus/constants": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/constants.ts",
"@docusaurus/isInternalUrl": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/isInternalUrl.ts",
"@docusaurus/renderRoutes": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/renderRoutes.ts",
"@docusaurus/router": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/router.ts",
+ "@docusaurus/useAnchor": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useAnchor.ts",
"@docusaurus/useBaseUrl": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useBaseUrl.ts",
"@docusaurus/useDocusaurusContext": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useDocusaurusContext.ts",
"@docusaurus/useGlobalData": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useGlobalData.ts",
"@docusaurus/useIsBrowser": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useIsBrowser.ts",
"@docusaurus/useIsomorphicLayoutEffect": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useIsomorphicLayoutEffect.tsx",
at Object.toMatchSnapshot (node_modules/expect/build/index.js:174:22)
at Object.toMatchSnapshot (packages/docusaurus/src/webpack/aliases/__tests__/index.test.ts:186:52)
|
handleBrokenLinks › do not report anything for correct paths:
packages/docusaurus/src/server/__tests__/brokenLinks.test.ts#L172
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 0
Received number of calls: 1
at Object.toHaveBeenCalledTimes (packages/docusaurus/src/server/__tests__/brokenLinks.test.ts:172:25)
|
handleBrokenLinks › reports all broken links:
packages/docusaurus/src/server/__tests__/brokenLinks.test.ts#L185
expect(received).rejects.toThrowErrorMatchingSnapshot()
Snapshot name: `handleBrokenLinks reports all broken links 1`
- Snapshot - 13
+ Received + 26
@@ -2,30 +2,43 @@
Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist.
Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.
Exhaustive list of all broken links found:
-
- - On source page path = /docs/good doc with space:
- -> linking to ./some%20other%20non-existent%20doc1 (resolved as: /docs/some%20other%20non-existent%20doc1)
- -> linking to ./break%2F..%2F..%2Fout2 (resolved as: /docs/break%2F..%2F..%2Fout2)
-
- - On source page path = /docs/goodDoc:
+ - On source page path = /docs/good doc with space:
+ -> linking to ./another%20good%20doc%20with%20space (resolved as: /docs/another%20good%20doc%20with%20space)
+ -> linking to ./weird%20but%20good (resolved as: /docs/weird%20but%20good)- Anchor On source page path = /docs/good doc with space:
+ -> linking to ./some%20other%20non-existent%20doc1 (resolved as: /docs/some%20other%20non-existent%20doc1)
+ -> linking to ./break%2F..%2F..%2Fout2 (resolved as: /docs/break%2F..%2F..%2Fout2)
+ - On source page path = /docs/goodDoc:
+ -> linking to ./anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to /docs/anotherGoodDoc?someQueryString=true#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc?someQueryString=true (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /docs/goodDoc:
-> linking to ../anotherGoodDoc#reported-because-of-bad-relative-path1 (resolved as: /anotherGoodDoc)
-> linking to ./docThatDoesNotExist2 (resolved as: /docs/docThatDoesNotExist2)
-> linking to ./badRelativeLink3 (resolved as: /docs/badRelativeLink3)
-> linking to ../badRelativeLink4 (resolved as: /badRelativeLink4)
-
- - On source page path = /community:
+ - On source page path = /community:
+ -> linking to /docs/goodDoc
+ -> linking to /docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ./docs/goodDoc#someHash (resolved as: /docs/goodDoc)
+ -> linking to ./docs/anotherGoodDoc (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /community:
-> linking to /someNonExistentDoc1
-> linking to /badLink2
-> linking to ./badLink3 (resolved as: /badLink3)
-
- - On source page path = /page1:
+ - Anchor On source page path = /page1:
-> linking to /link1
+ -> linking to /files/hey.html
+ -> linking to /javadoc
+ -> linking to /files/hey
+ -> linking to /javadoc/index.html
+ -> linking to /javadoc/index.html#foo (resolved as: /javadoc/index.html)
-> linking to /emptyFolder
-
- - On source page path = /page2:
+ - Anchor On source page path = /page2:
-> linking to /docs/link2
-> linking to /emptyFolder/
- -> linking to /hey/link3
+ -> linking to /javadoc/
+ -> linking to /hey/link3
+ -> linking to /javadoc/index.html
+ -> linking to /files/file.zip
↵
at Object.toThrowErrorMatchingSnapshot (node_modules/expect/build/index.js:218:22)
at Object.toThrowErrorMatchingSnapshot (packages/docusaurus/src/server/__tests__/brokenLinks.test.ts:185:15)
|
handleBrokenLinks › reports frequent broken links:
packages/docusaurus/src/server/__tests__/brokenLinks.test.ts#L224
expect(received).rejects.toThrowErrorMatchingSnapshot()
Snapshot name: `handleBrokenLinks reports frequent broken links 1`
- Snapshot - 11
+ Received + 24
@@ -9,40 +9,53 @@
Frequent broken links are linking to:
- /frequent
- ./maybe-not
Exhaustive list of all broken links found:
-
- - On source page path = /docs/good doc with space:
+ - On source page path = /docs/good doc with space:
+ -> linking to ./another%20good%20doc%20with%20space (resolved as: /docs/another%20good%20doc%20with%20space)
+ -> linking to ./weird%20but%20good (resolved as: /docs/weird%20but%20good)- Anchor On source page path = /docs/good doc with space:
-> linking to ./some%20other%20non-existent%20doc1 (resolved as: /docs/some%20other%20non-existent%20doc1)
-> linking to ./break%2F..%2F..%2Fout2 (resolved as: /docs/break%2F..%2F..%2Fout2)
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /docs/maybe-not)
-
- - On source page path = /docs/goodDoc:
+ - On source page path = /docs/goodDoc:
+ -> linking to ./anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to /docs/anotherGoodDoc?someQueryString=true#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc?someQueryString=true (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /docs/goodDoc:
-> linking to ../anotherGoodDoc#reported-because-of-bad-relative-path1 (resolved as: /anotherGoodDoc)
-> linking to ./docThatDoesNotExist2 (resolved as: /docs/docThatDoesNotExist2)
-> linking to ./badRelativeLink3 (resolved as: /docs/badRelativeLink3)
-> linking to ../badRelativeLink4 (resolved as: /badRelativeLink4)
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /docs/maybe-not)
-
- - On source page path = /community:
+ - On source page path = /community:
+ -> linking to /docs/goodDoc
+ -> linking to /docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ./docs/goodDoc#someHash (resolved as: /docs/goodDoc)
+ -> linking to ./docs/anotherGoodDoc (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /community:
-> linking to /someNonExistentDoc1
-> linking to /badLink2
-> linking to ./badLink3 (resolved as: /badLink3)
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /maybe-not)
-
- - On source page path = /page1:
+ - Anchor On source page path = /page1:
-> linking to /link1
+ -> linking to /files/hey.html
+ -> linking to /javadoc
+ -> linking to /files/hey
+ -> linking to /javadoc/index.html
+ -> linking to /javadoc/index.html#foo (resolved as: /javadoc/index.html)
-> linking to /emptyFolder
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /maybe-not)
-
- - On source page path = /page2:
+ - Anchor On source page path = /page2:
-> linking to /docs/link2
-> linking to /emptyFolder/
- -> linking to /hey/link3
+ -> linking to /javadoc/
+ -> linking to /hey/link3
+ -> linking to /javadoc/index.html
+ -> linking to /files/file.zip
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /maybe-not)
↵
at Object.toThrowErrorMatchingSnapshot (node_modules/expect/build/index.js:218:22)
at Object.toThrowErrorMatchingSnapshot (packages/docusaurus/src/server/__tests__/brokenLinks.test.ts:224:15)
|
loadSiteConfig › website with valid siteConfig:
packages/docusaurus/src/server/__tests__/config.test.ts#L18
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid siteConfig 1`
- Snapshot - 0
+ Received + 1
@@ -25,10 +25,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:18:20)
|
loadSiteConfig › website with ts + js config:
packages/docusaurus/src/server/__tests__/config.test.ts#L30
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with ts + js config 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"plugins": [],
"presets": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:30:20)
|
loadSiteConfig › website with .cjs siteConfig:
packages/docusaurus/src/server/__tests__/config.test.ts#L38
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with .cjs siteConfig 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"plugins": [],
"presets": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:38:20)
|
loadSiteConfig › website with valid config creator function:
packages/docusaurus/src/server/__tests__/config.test.ts#L47
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid config creator function 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:47:20)
|
loadSiteConfig › website with valid async config:
packages/docusaurus/src/server/__tests__/config.test.ts#L56
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid async config 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:56:20)
|
loadSiteConfig › website with valid async config creator function:
packages/docusaurus/src/server/__tests__/config.test.ts#L65
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid async config creator function 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:65:20)
|
Tests (18.0)
The job was canceled because "_18" failed.
|
getDocusaurusAliases › returns appropriate webpack aliases:
packages/docusaurus/src/webpack/aliases/__tests__/index.test.ts#L186
expect(received).resolves.toMatchSnapshot()
Snapshot name: `getDocusaurusAliases returns appropriate webpack aliases 1`
- Snapshot - 0
+ Received + 1
@@ -10,10 +10,11 @@
"@docusaurus/Translate": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/Translate.tsx",
"@docusaurus/constants": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/constants.ts",
"@docusaurus/isInternalUrl": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/isInternalUrl.ts",
"@docusaurus/renderRoutes": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/renderRoutes.ts",
"@docusaurus/router": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/router.ts",
+ "@docusaurus/useAnchor": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useAnchor.ts",
"@docusaurus/useBaseUrl": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useBaseUrl.ts",
"@docusaurus/useDocusaurusContext": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useDocusaurusContext.ts",
"@docusaurus/useGlobalData": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useGlobalData.ts",
"@docusaurus/useIsBrowser": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useIsBrowser.ts",
"@docusaurus/useIsomorphicLayoutEffect": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/useIsomorphicLayoutEffect.tsx",
at Object.toMatchSnapshot (node_modules/expect/build/index.js:174:22)
at Object.toMatchSnapshot (packages/docusaurus/src/webpack/aliases/__tests__/index.test.ts:186:52)
|
handleBrokenLinks › do not report anything for correct paths:
packages/docusaurus/src/server/__tests__/brokenLinks.test.ts#L172
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 0
Received number of calls: 1
at Object.toHaveBeenCalledTimes (packages/docusaurus/src/server/__tests__/brokenLinks.test.ts:172:25)
|
handleBrokenLinks › reports all broken links:
packages/docusaurus/src/server/__tests__/brokenLinks.test.ts#L185
expect(received).rejects.toThrowErrorMatchingSnapshot()
Snapshot name: `handleBrokenLinks reports all broken links 1`
- Snapshot - 13
+ Received + 26
@@ -2,30 +2,43 @@
Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist.
Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.
Exhaustive list of all broken links found:
-
- - On source page path = /docs/good doc with space:
- -> linking to ./some%20other%20non-existent%20doc1 (resolved as: /docs/some%20other%20non-existent%20doc1)
- -> linking to ./break%2F..%2F..%2Fout2 (resolved as: /docs/break%2F..%2F..%2Fout2)
-
- - On source page path = /docs/goodDoc:
+ - On source page path = /docs/good doc with space:
+ -> linking to ./another%20good%20doc%20with%20space (resolved as: /docs/another%20good%20doc%20with%20space)
+ -> linking to ./weird%20but%20good (resolved as: /docs/weird%20but%20good)- Anchor On source page path = /docs/good doc with space:
+ -> linking to ./some%20other%20non-existent%20doc1 (resolved as: /docs/some%20other%20non-existent%20doc1)
+ -> linking to ./break%2F..%2F..%2Fout2 (resolved as: /docs/break%2F..%2F..%2Fout2)
+ - On source page path = /docs/goodDoc:
+ -> linking to ./anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to /docs/anotherGoodDoc?someQueryString=true#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc?someQueryString=true (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /docs/goodDoc:
-> linking to ../anotherGoodDoc#reported-because-of-bad-relative-path1 (resolved as: /anotherGoodDoc)
-> linking to ./docThatDoesNotExist2 (resolved as: /docs/docThatDoesNotExist2)
-> linking to ./badRelativeLink3 (resolved as: /docs/badRelativeLink3)
-> linking to ../badRelativeLink4 (resolved as: /badRelativeLink4)
-
- - On source page path = /community:
+ - On source page path = /community:
+ -> linking to /docs/goodDoc
+ -> linking to /docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ./docs/goodDoc#someHash (resolved as: /docs/goodDoc)
+ -> linking to ./docs/anotherGoodDoc (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /community:
-> linking to /someNonExistentDoc1
-> linking to /badLink2
-> linking to ./badLink3 (resolved as: /badLink3)
-
- - On source page path = /page1:
+ - Anchor On source page path = /page1:
-> linking to /link1
+ -> linking to /files/hey.html
+ -> linking to /javadoc
+ -> linking to /files/hey
+ -> linking to /javadoc/index.html
+ -> linking to /javadoc/index.html#foo (resolved as: /javadoc/index.html)
-> linking to /emptyFolder
-
- - On source page path = /page2:
+ - Anchor On source page path = /page2:
-> linking to /docs/link2
-> linking to /emptyFolder/
- -> linking to /hey/link3
+ -> linking to /javadoc/
+ -> linking to /hey/link3
+ -> linking to /javadoc/index.html
+ -> linking to /files/file.zip
↵
at Object.toThrowErrorMatchingSnapshot (node_modules/expect/build/index.js:218:22)
at Object.toThrowErrorMatchingSnapshot (packages/docusaurus/src/server/__tests__/brokenLinks.test.ts:185:15)
|
handleBrokenLinks › reports frequent broken links:
packages/docusaurus/src/server/__tests__/brokenLinks.test.ts#L224
expect(received).rejects.toThrowErrorMatchingSnapshot()
Snapshot name: `handleBrokenLinks reports frequent broken links 1`
- Snapshot - 11
+ Received + 24
@@ -9,40 +9,53 @@
Frequent broken links are linking to:
- /frequent
- ./maybe-not
Exhaustive list of all broken links found:
-
- - On source page path = /docs/good doc with space:
+ - On source page path = /docs/good doc with space:
+ -> linking to ./another%20good%20doc%20with%20space (resolved as: /docs/another%20good%20doc%20with%20space)
+ -> linking to ./weird%20but%20good (resolved as: /docs/weird%20but%20good)- Anchor On source page path = /docs/good doc with space:
-> linking to ./some%20other%20non-existent%20doc1 (resolved as: /docs/some%20other%20non-existent%20doc1)
-> linking to ./break%2F..%2F..%2Fout2 (resolved as: /docs/break%2F..%2F..%2Fout2)
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /docs/maybe-not)
-
- - On source page path = /docs/goodDoc:
+ - On source page path = /docs/goodDoc:
+ -> linking to ./anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to /docs/anotherGoodDoc?someQueryString=true#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc?someQueryString=true (resolved as: /docs/anotherGoodDoc)
+ -> linking to ../docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /docs/goodDoc:
-> linking to ../anotherGoodDoc#reported-because-of-bad-relative-path1 (resolved as: /anotherGoodDoc)
-> linking to ./docThatDoesNotExist2 (resolved as: /docs/docThatDoesNotExist2)
-> linking to ./badRelativeLink3 (resolved as: /docs/badRelativeLink3)
-> linking to ../badRelativeLink4 (resolved as: /badRelativeLink4)
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /docs/maybe-not)
-
- - On source page path = /community:
+ - On source page path = /community:
+ -> linking to /docs/goodDoc
+ -> linking to /docs/anotherGoodDoc#someHash (resolved as: /docs/anotherGoodDoc)
+ -> linking to ./docs/goodDoc#someHash (resolved as: /docs/goodDoc)
+ -> linking to ./docs/anotherGoodDoc (resolved as: /docs/anotherGoodDoc)- Anchor On source page path = /community:
-> linking to /someNonExistentDoc1
-> linking to /badLink2
-> linking to ./badLink3 (resolved as: /badLink3)
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /maybe-not)
-
- - On source page path = /page1:
+ - Anchor On source page path = /page1:
-> linking to /link1
+ -> linking to /files/hey.html
+ -> linking to /javadoc
+ -> linking to /files/hey
+ -> linking to /javadoc/index.html
+ -> linking to /javadoc/index.html#foo (resolved as: /javadoc/index.html)
-> linking to /emptyFolder
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /maybe-not)
-
- - On source page path = /page2:
+ - Anchor On source page path = /page2:
-> linking to /docs/link2
-> linking to /emptyFolder/
- -> linking to /hey/link3
+ -> linking to /javadoc/
+ -> linking to /hey/link3
+ -> linking to /javadoc/index.html
+ -> linking to /files/file.zip
-> linking to /frequent
-> linking to ./maybe-not (resolved as: /maybe-not)
↵
at Object.toThrowErrorMatchingSnapshot (node_modules/expect/build/index.js:218:22)
at Object.toThrowErrorMatchingSnapshot (packages/docusaurus/src/server/__tests__/brokenLinks.test.ts:224:15)
|
loadSiteConfig › website with valid siteConfig:
packages/docusaurus/src/server/__tests__/config.test.ts#L18
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid siteConfig 1`
- Snapshot - 0
+ Received + 1
@@ -25,10 +25,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:18:20)
|
loadSiteConfig › website with ts + js config:
packages/docusaurus/src/server/__tests__/config.test.ts#L30
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with ts + js config 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"plugins": [],
"presets": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:30:20)
|
loadSiteConfig › website with .cjs siteConfig:
packages/docusaurus/src/server/__tests__/config.test.ts#L38
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with .cjs siteConfig 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"plugins": [],
"presets": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:38:20)
|
loadSiteConfig › website with valid config creator function:
packages/docusaurus/src/server/__tests__/config.test.ts#L47
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid config creator function 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:47:20)
|
loadSiteConfig › website with valid async config:
packages/docusaurus/src/server/__tests__/config.test.ts#L56
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid async config 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:56:20)
|
loadSiteConfig › website with valid async config creator function:
packages/docusaurus/src/server/__tests__/config.test.ts#L65
expect(received).toMatchSnapshot()
Snapshot name: `loadSiteConfig website with valid async config creator function 1`
- Snapshot - 0
+ Received + 1
@@ -22,10 +22,11 @@
},
"mermaid": false,
"preprocessor": undefined,
},
"noIndex": false,
+ "onBrokenAnchors": "warn",
"onBrokenLinks": "throw",
"onBrokenMarkdownLinks": "warn",
"onDuplicateRoutes": "warn",
"organizationName": "endiliey",
"plugins": [],
at Object.toMatchSnapshot (packages/docusaurus/src/server/__tests__/config.test.ts:65:20)
|