sorted markdown and added favicon
This commit is contained in:
@@ -17,7 +17,7 @@ async function read(relativePath) {
|
||||
return readAppFile(relativePath);
|
||||
}
|
||||
|
||||
async function markdownFiles(directory = root) {
|
||||
async function markdownFiles(directory = path.join(root, 'docs')) {
|
||||
const result = [];
|
||||
const entries = await fs.readdir(directory, { withFileTypes: true });
|
||||
for (const entry of entries) {
|
||||
@@ -49,8 +49,8 @@ function assertMiddleware(declaration, middleware) {
|
||||
|
||||
test('complete REST API documentation is kept outside the README', async () => {
|
||||
const files = await markdownFiles();
|
||||
const readmePath = files.find(file => path.basename(file).toLowerCase() === 'readme.md');
|
||||
assert.ok(readmePath, 'README.md is missing');
|
||||
const readmePath = path.join(root, 'docs', 'README.md');
|
||||
assert.ok(files.includes(readmePath), 'docs/README.md is missing');
|
||||
|
||||
const readme = await fs.readFile(readmePath, 'utf8');
|
||||
const outsideReadme = files.filter(file => file !== readmePath);
|
||||
|
||||
Reference in New Issue
Block a user