mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +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();
|
||||
});
|
||||
|
||||
// need options to close socket faster
|
||||
test.skip('cloudcmd: console: disabled', async (t) => {
|
||||
const config = {
|
||||
console: false,
|
||||
|
|
@ -37,12 +38,12 @@ test.skip('cloudcmd: console: disabled', async (t) => {
|
|||
const {port, done} = await connect({config});
|
||||
const socket = io(`http://localhost:${port}/console`);
|
||||
|
||||
const [error] = await once(socket, 'error');
|
||||
const [error] = await once(socket, 'connect_error');
|
||||
|
||||
socket.close();
|
||||
await done();
|
||||
|
||||
t.equal(error, 'Invalid namespace', 'should emit error');
|
||||
t.equal(error.message, 'Invalid namespace', 'should emit error');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue