mirror of
https://github.com/remoteintech/remote-jobs
synced 2024-11-10 14:44:14 +00:00
Improve error message for filename/title mismatch (#520)
This commit is contained in:
parent
f09c3f48f7
commit
13ba307516
2 changed files with 5 additions and 5 deletions
|
@ -302,9 +302,9 @@ exports.parseFromDirectory = contentPath => {
|
||||||
filenameExpected.substring( 0, filenameBase.length + 1 ) !== filenameBase + '-'
|
filenameExpected.substring( 0, filenameBase.length + 1 ) !== filenameBase + '-'
|
||||||
) {
|
) {
|
||||||
profileError(
|
profileError(
|
||||||
'Expected filename "%s.md" for company "%s"',
|
'Company title "%s" doesn\'t match filename (expected ~ "%s.md")',
|
||||||
filenameExpected,
|
companyName,
|
||||||
companyName
|
filenameExpected
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,10 +68,10 @@ describe( 'validation errors', () => {
|
||||||
'10up.md: Expected 1 first-level heading but found 0',
|
'10up.md: Expected 1 first-level heading but found 0',
|
||||||
'10up.md: The main title is wrapped inside of another element.',
|
'10up.md: The main title is wrapped inside of another element.',
|
||||||
'10up.md: Company name looks wrong: ""',
|
'10up.md: Company name looks wrong: ""',
|
||||||
'17hats.md: Expected filename "a-company-called-17hats.md" for company "A company called 17hats"',
|
'17hats.md: Company title "A company called 17hats" doesn\'t match filename (expected ~ "a-company-called-17hats.md")',
|
||||||
'18f.md: Company name looks wrong: "$%$#%$"',
|
'18f.md: Company name looks wrong: "$%$#%$"',
|
||||||
'and-yet.md: Expected 1 first-level heading but found 2',
|
'and-yet.md: Expected 1 first-level heading but found 2',
|
||||||
'let-s-encrypt.md: Expected filename "lets-encrypt.md" for company "Let\'s Encrypt"',
|
'let-s-encrypt.md: Company title "Let\'s Encrypt" doesn\'t match filename (expected ~ "lets-encrypt.md")',
|
||||||
],
|
],
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in a new issue