mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore: cloudcmd: actions: lint ☘️
This commit is contained in:
parent
7aacf203a0
commit
6b9d43e9ab
16 changed files with 28 additions and 9 deletions
|
|
@ -49,8 +49,7 @@ function before(options, fn = options) {
|
|||
|
||||
server.listen(() => {
|
||||
fn(server
|
||||
.address()
|
||||
.port, promisify(after));
|
||||
.address().port, promisify(after));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ test('cloudcmd: client: listeners: getRange: direct', (t) => {
|
|||
'how',
|
||||
'come',
|
||||
];
|
||||
|
||||
const result = getRange(0, 1, files);
|
||||
|
||||
t.deepEqual(result, expected, 'should return range');
|
||||
|
|
@ -33,6 +34,7 @@ test('cloudcmd: client: listeners: getRange: reverse', (t) => {
|
|||
'how',
|
||||
'come',
|
||||
];
|
||||
|
||||
const result = getRange(1, 0, files);
|
||||
|
||||
t.deepEqual(result, expected, 'should return range');
|
||||
|
|
@ -46,6 +48,7 @@ test('cloudcmd: client: listeners: getRange: one', (t) => {
|
|||
'how',
|
||||
'come',
|
||||
];
|
||||
|
||||
const result = getRange(0, 0, files);
|
||||
|
||||
t.deepEqual(result, expected, 'should return range');
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ test('cloudcmd: console: enabled', async (t) => {
|
|||
const {port, done} = await connect({
|
||||
config,
|
||||
});
|
||||
|
||||
const socket = io(`http://localhost:${port}/console`);
|
||||
|
||||
socket.emit('auth', configFn('username'), configFn('password'));
|
||||
|
|
@ -39,6 +40,7 @@ test('cloudcmd: console: disabled', async (t) => {
|
|||
const {port, done} = await connect({
|
||||
config,
|
||||
});
|
||||
|
||||
const socket = io(`http://localhost:${port}/console`);
|
||||
|
||||
const [error] = await once(socket, 'connect_error');
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ test('cloudcmd: /cloudcmd.js: auth: no password', async (t) => {
|
|||
const encoded = Buffer
|
||||
.from(`${username}:`)
|
||||
.toString('base64');
|
||||
|
||||
const authorization = `Basic ${encoded}`;
|
||||
|
||||
const {status} = await request.get(`/${name}`, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue