mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
chore(cloudcmd) lint
This commit is contained in:
parent
d6674aed3e
commit
3bac819760
14 changed files with 21 additions and 19 deletions
|
|
@ -64,7 +64,7 @@ test('cloudcmd: rest: config: patch: no configDialog', async (t) => {
|
|||
const body = {
|
||||
ip: null,
|
||||
};
|
||||
|
||||
|
||||
const result = await request.patch(`/api/v1/config`, {
|
||||
body,
|
||||
options,
|
||||
|
|
@ -91,7 +91,7 @@ test('cloudcmd: rest: config: patch: no configDialog: statusCode', async (t) =>
|
|||
body,
|
||||
options,
|
||||
});
|
||||
|
||||
|
||||
manageConfig('configDialog', true);
|
||||
|
||||
t.equal(response.status, 404);
|
||||
|
|
@ -110,7 +110,7 @@ test('cloudcmd: rest: config: patch: save config', async (t) => {
|
|||
});
|
||||
|
||||
const config = readjson.sync(pathConfig);
|
||||
|
||||
|
||||
t.equal(config.editor, 'dword', 'should change config file on patch');
|
||||
t.end();
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ test('cloudcmd: rest: pack: tar: get', async (t) => {
|
|||
const extract = tar.extract();
|
||||
|
||||
body.pipe(gunzip()).pipe(extract);
|
||||
|
||||
|
||||
const [, stream] = await once('entry', extract);
|
||||
const data = await pullout(stream);
|
||||
const file = fs.readFileSync(__dirname + '/../fixture/pack', 'utf8');
|
||||
|
|
@ -92,7 +92,7 @@ test('cloudcmd: rest: pack: tar: put: file', async (t) => {
|
|||
const result = fs.readFileSync(__dirname + '/../fixture/pack');
|
||||
|
||||
fs.unlinkSync(`${__dirname}/../${name}`);
|
||||
|
||||
|
||||
t.deepEqual(result, data, 'should create archive');
|
||||
t.end();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue