chore: lint

This commit is contained in:
coderaiser 2023-07-09 12:43:24 +03:00
parent f1279666b5
commit 4717e035ee
173 changed files with 1388 additions and 1627 deletions

View file

@ -13,7 +13,6 @@ const root = require('../root');
const parse = threadIt(join(__dirname, 'worker'));
threadIt.init();
// warm up
parse('');
@ -63,4 +62,3 @@ function check(name, request) {
if (!request)
throw Error('request could not be empty!');
}

View file

@ -14,7 +14,9 @@ const cloudcmd = require('../..');
const config = {
auth: false,
};
const configManager = cloudcmd.createConfigManager();
const {request} = require('serve-once')(cloudcmd, {
config,
configManager,
@ -101,6 +103,7 @@ test('cloudcmd: markdown', async (t) => {
config,
configManager,
});
const {body} = await request.get('/api/v1/markdown/markdown.md');
t.equal(body, '<h1>hello</h1>\n');
@ -119,6 +122,7 @@ test('cloudcmd: markdown: zip', async (t) => {
config,
configManager,
});
const {body} = await request.get('/api/v1/markdown/markdown.zip/markdown.md');
t.equal(body, '<h1>hello</h1>\n');

View file

@ -1,4 +1,5 @@
'use strict';
const markdownIt = require('markdown-it')();
module.exports = (a) => markdownIt.render(a);