mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore: lint
This commit is contained in:
parent
f1279666b5
commit
4717e035ee
173 changed files with 1388 additions and 1627 deletions
|
|
@ -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!');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
const markdownIt = require('markdown-it')();
|
||||
|
||||
module.exports = (a) => markdownIt.render(a);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue