diff --git a/test/test.ts b/test/test.ts index a1f959f..181a6e7 100644 --- a/test/test.ts +++ b/test/test.ts @@ -9,7 +9,7 @@ tap.test('should create a valid instance of SmartNetwork', async () => { }); tap.test('should perform a speedtest', async () => { - let result = await testSmartNetwork.getSpeed(); + const result = await testSmartNetwork.getSpeed(); console.log(`Download speed for this instance is ${result.speeds.download}`); console.log(`Upload speed for this instance is ${result.speeds.upload}`); }); diff --git a/ts/smartnetwork.classes.smartnetwork.ts b/ts/smartnetwork.classes.smartnetwork.ts index 73ea6ce..09e4978 100644 --- a/ts/smartnetwork.classes.smartnetwork.ts +++ b/ts/smartnetwork.classes.smartnetwork.ts @@ -57,7 +57,7 @@ export class SmartNetwork { * note: false also resolves with false as argument * @param port */ - public async isLocalPortAvailable(port: number): Promise { + public async isLocalPortUnused(port: number): Promise { const doneIpV4 = plugins.smartpromise.defer(); const doneIpV6 = plugins.smartpromise.defer(); const net = await import('net'); // creates only one instance of net ;) even on multiple calls