mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(console) hang
This commit is contained in:
parent
983609f19a
commit
5a1a39478f
1 changed files with 3 additions and 2 deletions
|
|
@ -29,6 +29,7 @@ test('cloudcmd: console: enabled', async (t) => {
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// need options to close socket faster
|
||||||
test.skip('cloudcmd: console: disabled', async (t) => {
|
test.skip('cloudcmd: console: disabled', async (t) => {
|
||||||
const config = {
|
const config = {
|
||||||
console: false,
|
console: false,
|
||||||
|
|
@ -37,12 +38,12 @@ test.skip('cloudcmd: console: disabled', async (t) => {
|
||||||
const {port, done} = await connect({config});
|
const {port, done} = await connect({config});
|
||||||
const socket = io(`http://localhost:${port}/console`);
|
const socket = io(`http://localhost:${port}/console`);
|
||||||
|
|
||||||
const [error] = await once(socket, 'error');
|
const [error] = await once(socket, 'connect_error');
|
||||||
|
|
||||||
socket.close();
|
socket.close();
|
||||||
await done();
|
await done();
|
||||||
|
|
||||||
t.equal(error, 'Invalid namespace', 'should emit error');
|
t.equal(error.message, 'Invalid namespace', 'should emit error');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue