mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(markdown) coverage
This commit is contained in:
parent
6dba4ba186
commit
fc5b454ad3
1 changed files with 15 additions and 0 deletions
|
|
@ -19,6 +19,21 @@ const get = promisify((url, fn) => {
|
|||
fn(null, request(url));
|
||||
});
|
||||
|
||||
test('cloudcmd: markdown: error', (t) => {
|
||||
before((port, after) => {
|
||||
get(`http://localhost:${port}/api/v1/markdown/not-found`)
|
||||
.then(warp(_pullout, 'string'))
|
||||
.then((result) => {
|
||||
t.ok(/ENOENT/.test(result), 'should not found');
|
||||
t.end();
|
||||
after();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('cloudcmd: markdown: relative: error', (t) => {
|
||||
before((port, after) => {
|
||||
get(`http://localhost:${port}/api/v1/markdown/not-found?relative`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue