When a internal error appear in tests executions while bots are loged. this happens i.e:
Client bot is ready for tests!
TypeError: test is not a function
at Object.<anonymous> (E:\Git\concord\tests\simple-messages\testWait1.js:3:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at E:\Git\concord\lib\shell.js:12:13
at Array.forEach (<anonymous>)
at Object.runTest (E:\Git\concord\lib\shell.js:10:13)
(node:2444) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Error [ERR_UNHANDLED_ERROR]: Unhandled error. (ErrorEvent {
target: WebSocket {
_events: [Object: null prototype] {
message: [Function],
open: [Function],
error: [Function],
close: [Function]
},
_eventsCount: 4,
_maxListeners: undefined,
readyState: 2,
protocol: '',
_binaryType: 'nodebuffer',
_closeFrameReceived: false,
_closeFrameSent: false,
_closeMessage: '',
_closeTimer: null,
_closeCode: 1006,
_extensions: {},
_receiver: null,
_sender: null,
_socket: null,
_isServer: false,
_redirects: 0,
url: 'wss://gateway.discord.gg/?v=6&encoding=json',
_req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'GET /?v=6&encoding=json HTTP/1.1\r\n' +
'Sec-WebSocket-Version: 13\r\n' +
'Sec-WebSocket-Key: sLuzCsPoJKiWzJ+iZ5irTQ==\r\n' +
'Connection: Upgrade\r\n' +
'Upgrade: websocket\r\n' +
'Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\n' +
'Host: gateway.discord.gg\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: undefined,
socketPath: undefined,
method: 'GET',
path: '/?v=6&encoding=json',
_ended: false,
res: null,
aborted: true,
timeoutCb: null,
upgradeOrConnect: false,
parser: [HTTPParser],
maxHeadersCount: null,
[Symbol(isCorked)]: false,
[Symbol(outHeadersKey)]: [Object: null prototype]
}
},
type: 'error',
message: 'WebSocket was closed before the connection was established',
error: Error: WebSocket was closed before the connection was established
at WebSocket.close (E:\Git\concord\node_modules\ws\lib\websocket.js:217:14)
at WebSocketConnection.destroy (E:\Git\concord\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:276:8)
at WebSocketManager.destroy (E:\Git\concord\node_modules\discord.js\src\client\websocket\WebSocketManager.js:52:28)
at ClientManager.destroy (E:\Git\concord\node_modules\discord.js\src\client\ClientManager.js:60:20)
at Client.destroy (E:\Git\concord\node_modules\discord.js\src\client\Client.js:292:25)
at Object.<anonymous> (E:\Git\concord\lib\bot.js:92:33)
at Generator.next (<anonymous>)
at fulfilled (E:\Git\concord\lib\bot.js:4:58)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
})
at Client.emit (events.js:192:17)
at WebSocketConnection.onError (E:\Git\concord\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:374:17)
at WebSocket.onError (E:\Git\concord\node_modules\ws\lib\event-target.js:128:16)
at WebSocket.emit (events.js:203:13)
at abortHandshake (E:\Git\concord\node_modules\ws\lib\websocket.js:718:15)
at WebSocket.close (E:\Git\concord\node_modules\ws\lib\websocket.js:217:14)
at WebSocketConnection.destroy (E:\Git\concord\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:276:8)
at WebSocketManager.destroy (E:\Git\concord\node_modules\discord.js\src\client\websocket\WebSocketManager.js:52:28)
at ClientManager.destroy (E:\Git\concord\node_modules\discord.js\src\client\ClientManager.js:60:20)
at Client.destroy (E:\Git\concord\node_modules\discord.js\src\client\Client.js:292:25) {
context: ErrorEvent {
target: WebSocket {
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
readyState: 3,
protocol: '',
_binaryType: 'nodebuffer',
_closeFrameReceived: false,
_closeFrameSent: false,
_closeMessage: '',
_closeTimer: null,
_closeCode: 1006,
_extensions: {},
_receiver: null,
_sender: null,
_socket: null,
_isServer: false,
_redirects: 0,
url: 'wss://gateway.discord.gg/?v=6&encoding=json',
_req: [ClientRequest]
at processTicksAndRejections (internal/process/task_queues.js:85:5)
}
}