mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(cloudcmd) ok -> match
This commit is contained in:
parent
a091a382ca
commit
21e7ea7d4c
8 changed files with 26 additions and 15 deletions
|
|
@ -6,6 +6,9 @@
|
|||
"fontello.json"
|
||||
],
|
||||
"match": {
|
||||
"route.spec.js": {
|
||||
"tape/convert-ok-to-match": "off"
|
||||
},
|
||||
"*.js": {
|
||||
"convert-esm-to-commonjs": "on"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
'use strict';
|
||||
await IO.copy(dirPath, mp3Dir, mp3Names);
|
||||
async function copy() {
|
||||
await IO.copy(dirPath, mp3Dir, mp3Names);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
await IO.cp({
|
||||
from: dirPath,
|
||||
to: mp3Dir,
|
||||
names: mp3Names,
|
||||
});
|
||||
async function copy() {
|
||||
await IO.cp({
|
||||
from: dirPath,
|
||||
to: mp3Dir,
|
||||
names: mp3Names,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
'use strict';
|
||||
await IO.move(dirPath, mp3Dir, mp3Names);
|
||||
async function move() {
|
||||
await IO.move(dirPath, mp3Dir, mp3Names);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
await IO.mv({
|
||||
from: dirPath,
|
||||
to: mp3Dir,
|
||||
names: mp3Names,
|
||||
});
|
||||
async function move() {
|
||||
await IO.mv({
|
||||
from: dirPath,
|
||||
to: mp3Dir,
|
||||
names: mp3Names,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ test('cloudcmd: markdown: put: error', async (t) => {
|
|||
|
||||
const [e] = await tryToCatch(_markdown, name, '/', mdStream);
|
||||
|
||||
t.ok(e.message.includes('ENOENT: no such file or directory'), 'should emit error');
|
||||
t.match(e.message, /ENOENT: no such file or directory/, 'should emit error');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ test('cloudcmd: route: not found', async (t) => {
|
|||
options,
|
||||
});
|
||||
|
||||
t.ok(body.includes('ENOENT: no such file or directory'), 'should return error');
|
||||
t.match(body, /ENOENT: no such file or directory/, 'should return error');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ test('cloudcmd: terminal: enabled: no string', (t) => {
|
|||
const msg = 'cloudcmd --terminal: Cannot find module \'hello\'';
|
||||
const [arg] = log.args[0];
|
||||
|
||||
t.ok(arg.includes(msg), 'should call with msg');
|
||||
t.match(arg, RegExp(msg), 'should call with msg');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue