From 2d5fed102db4f0db49c4186f4ef1064d4f252ed6 Mon Sep 17 00:00:00 2001 From: Dmytro Nazarenko Date: Thu, 7 Oct 2021 19:47:37 +0300 Subject: [PATCH] SKALE-2394 Add ws unit test --- test/index.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/index.test.js b/test/index.test.js index 64d8209..2db53ef 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -77,6 +77,13 @@ describe('Test FilestorageClient', function () { assert.instanceOf(filestorageClient.contract, FilestorageContract); }); + it('should initialize with ws endpoint', async function () { + let filestorageClient = new FilestorageClient('ws://127.0.0.1:1234'); + assert.instanceOf(filestorageClient, FilestorageClient); + assert.instanceOf(filestorageClient.web3, Web3); + assert.instanceOf(filestorageClient.contract, FilestorageContract); + }); + it('should initialize with enabled logs', function () { let filestorageClient = new FilestorageClient(process.env.SKALE_ENDPOINT, true); assert.isTrue(filestorageClient.enableLogs);