feat: improve errors message to distinguish between file system and fragment errors

This commit is contained in:
2023-06-27 13:15:03 +02:00
parent 6c4e8cec9c
commit a33c682974
4 changed files with 18 additions and 11 deletions

View File

@ -23,7 +23,7 @@ test('ensure the rule validate correctly', async () => {
)
assert.equal(
lintResults['test/fixtures/Invalid.md'][0]?.errorDetail,
'Link "./basic.test.js" is not valid'
'Link "./basic.test.js" should exist in the file system'
)
assert.equal(
@ -32,7 +32,7 @@ test('ensure the rule validate correctly', async () => {
)
assert.equal(
lintResults['test/fixtures/Invalid.md'][1]?.errorDetail,
'Link "../image.png" is not valid'
'Link "../image.png" should exist in the file system'
)
assert.equal(
@ -41,6 +41,6 @@ test('ensure the rule validate correctly', async () => {
)
assert.equal(
lintResults['test/fixtures/Invalid.md'][2]?.errorDetail,
'Link "./Valid.md#not-existing-heading" is not valid'
'Link "./Valid.md#not-existing-heading" should have a valid fragment'
)
})