mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
chore(cloudcmd) lint
This commit is contained in:
parent
916b971e77
commit
943924adef
3 changed files with 6 additions and 11 deletions
|
|
@ -110,15 +110,12 @@ test('cloudcmd: replaceDist: !isDev', (t) => {
|
|||
const cloudcmdPath = DIR + 'cloudcmd';
|
||||
|
||||
const reset = cleanNodeEnv();
|
||||
|
||||
const {_replaceDist} = reRequire(cloudcmdPath);
|
||||
|
||||
const result = _replaceDist(url);
|
||||
const expected = url;
|
||||
|
||||
reset();
|
||||
|
||||
t.equal(result, expected, 'should equal');
|
||||
t.equal(result, url, 'should equal');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,8 @@ const mockRequire = require('mock-require');
|
|||
const {reRequire} = mockRequire;
|
||||
const serveOnce = require('serve-once');
|
||||
|
||||
const root = '../../';
|
||||
const dir = root + 'server/';
|
||||
const cloudcmdPath = root;
|
||||
const cloudcmdPath = '../../';
|
||||
const dir = cloudcmdPath + 'server/';
|
||||
const restPath = dir + 'rest';
|
||||
|
||||
test('cloudcmd: rest: mv', async (t) => {
|
||||
|
|
|
|||
|
|
@ -4,12 +4,11 @@ const {join} = require('path');
|
|||
const test = require('supertape');
|
||||
const stub = require('@cloudcmd/stub');
|
||||
|
||||
const dir = join(__dirname, '..', '..');
|
||||
const modulesPath = join(dir, 'json', 'modules.json');
|
||||
const cloudcmdPath = dir;
|
||||
const cloudcmdPath = join(__dirname, '..', '..');
|
||||
const modulesPath = join(cloudcmdPath, 'json', 'modules.json');
|
||||
|
||||
const localModules = require(modulesPath);
|
||||
const modulas = require(`${dir}/server/modulas`);
|
||||
const modulas = require(`${cloudcmdPath}/server/modulas`);
|
||||
|
||||
const cloudcmd = require(cloudcmdPath);
|
||||
const {request} = require('serve-once')(cloudcmd, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue