mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
fix integration test
This commit is contained in:
@@ -588,9 +588,7 @@ class Client extends EventEmitter {
|
||||
})
|
||||
this.networkID = response.result.info.network_id ?? undefined
|
||||
this.buildVersion = response.result.info.build_version
|
||||
return Promise.resolve()
|
||||
})
|
||||
// return this.connection.connect()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,13 +12,11 @@ describe('on handlers', function () {
|
||||
'on connect',
|
||||
async () => {
|
||||
const client = new Client(serverUrl)
|
||||
return new Promise<void>(function (resolve) {
|
||||
client.on('connected', function () {
|
||||
client.removeAllListeners()
|
||||
client.disconnect().then(() => resolve())
|
||||
})
|
||||
client.connect()
|
||||
client.on('connected', function () {
|
||||
client.removeAllListeners()
|
||||
})
|
||||
await client.connect()
|
||||
await client.disconnect()
|
||||
},
|
||||
TIMEOUT,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user