mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) lint
This commit is contained in:
parent
66fdb550a6
commit
d8d9025286
5 changed files with 9 additions and 5 deletions
|
|
@ -13,7 +13,8 @@ test('cloudcmd: common: callbackify: error', async (t) => {
|
|||
const promise = stub().rejects(Error('hello'));
|
||||
|
||||
const fn = callbackify(promise);
|
||||
const [error] = await tryToCatch(promisify(fn));
|
||||
const newPromise = promisify(fn);
|
||||
const [error] = await tryToCatch(newPromise);
|
||||
|
||||
t.equal(error.message, 'hello');
|
||||
t.end();
|
||||
|
|
|
|||
|
|
@ -229,7 +229,8 @@ module.exports.buildFromJSON = (params) => {
|
|||
owner,
|
||||
mode,
|
||||
});
|
||||
}).join('');
|
||||
})
|
||||
.join('');
|
||||
|
||||
fileTable += '</ul>';
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const tryToPromiseAll = require('./try-to-promise-all');
|
|||
const resolve = Promise.resolve.bind(Promise);
|
||||
const reject = Promise.reject.bind(Promise);
|
||||
|
||||
test('try-to-promise-all', async (t) => {
|
||||
test('commons: try-to-promise-all', async (t) => {
|
||||
const [, ...result] = await tryToPromiseAll([
|
||||
resolve('a'),
|
||||
resolve('b'),
|
||||
|
|
@ -18,7 +18,7 @@ test('try-to-promise-all', async (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('try-to-promise-all: error', async (t) => {
|
||||
test('commons: try-to-promise-all: error', async (t) => {
|
||||
const [e] = await tryToPromiseAll([
|
||||
reject('a'),
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -31,4 +31,6 @@ test('distribute: log: config', (t) => {
|
|||
config('log', logOriginal);
|
||||
|
||||
t.end();
|
||||
}, {
|
||||
checkAssertionsCount: false
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const fs = require('fs');
|
|||
const {reRequire} = require('mock-require');
|
||||
const columnsPath = '../../server/columns';
|
||||
|
||||
test('columns', (t) => {
|
||||
test('columns: prod', (t) => {
|
||||
const {NODE_ENV} = process.env;
|
||||
process.env.NODE_ENV = '';
|
||||
const columns = reRequire(columnsPath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue