everx-labs / ever-sdk-js

Javascript SDK for TVM blockchains (Everscale, TON, Venom, etc)

Home Page:https://tonlabs.github.io/ever-sdk-js/

Repository from Github https://github.comeverx-labs/ever-sdk-jsRepository from Github https://github.comeverx-labs/ever-sdk-js

TestsRunner does not show progress of tests, shows broken result and freezes at the end (Windows)

ch1seL opened this issue · comments

os: Windows 10.0.19042.0
node: 15.11.0
npm: 7.6.3
tsc: 4.2.3

Steps to reproduce:

cd packages\tests-node 
$env:USE_NODE_SE="true";$env:TON_NETWORK_ADDRESS="http://localhost";node run

Expected result:

1.10.0
✓ Test versions compatibility (1 / 0)
✓ crypto (2 / 0)
✓ encode_message (3 / 0)
✓ net (4 / 0)
✓ Block signatures (5 / 0)
✓ All Accounts (6 / 0)
✓ Ranges (7 / 0)
✓ Wait For (8 / 0)
✓ Subscribe for transactions with addresses (ABIv1) (9 / 0)
✓ Subscribe for transactions with addresses (ABIv2) (10 / 0)
✓ Subscribe for messages (ABI v1) (11 / 0)
✓ Subscribe for messages (ABI v2) (12 / 0)
✓ Transactions with addresses (13 / 0)
✓ Check shard_hashes greater then 0 (14 / 0)
---
success: 14
failure: 0

Actual result:

1.10.0
{ version: '1.10.0', passed: 0, failed: 0, finished: false }

Run frozen, but I catch transactions in the blockchain of Node SE

PS: I've tried to add console.log there https://github.com/tonlabs/ton-client-js/blob/c00b42e6705dfd9f2499173905c58db102e9ee0e/packages/tests-node/run.js#L19

node run
[TEST_START] {"name":"Test versions compatibility"}

1.10.0
[TEST_START] {"name":"crypto"}

[TEST_START] {"name":"encode_message"}

[TEST_START] {"name":"net"}

[TEST_START] {"name":"Block signatures"}

[TEST_START] {"name":"All Accounts"}

[TEST_START] {"name":"Message"}

[TEST_START] {"name":"Ranges"}

[TEST_START] {"name":"Wait For"}

[TEST_START] {"name":"Subscribe for transactions with addresses (ABIv1)"}

[TEST_START] {"name":"Subscribe for transactions with addresses (ABIv2)"}

[TEST_START] {"name":"Subscribe for messages (ABI v1)"}

[TEST_START] {"name":"Subscribe for messages (ABI v2)"}

[TEST_START] {"name":"Transactions with addresses"}

[TEST_START] {"name":"Subscribe for failed server"}

[TEST_START] {"name":"Check shard_hashes greater then 0"}

[TEST_START] {"name":"Subscribe for accounts"}

[TEST_START] {"name":"Long time subscription"}

>>> TypeError: results.forEach is not a function

{ version: '1.10.0', passed: 0, failed: 0, finished: false }

Can't reproduce, try downgrade node to LTS.

PS C:\Users\User> (Get-WMIObject win32_operatingsystem).version
10.0.19041

PS C:\Users\User> (Get-WMIObject win32_operatingsystem).buildnumber
19041

npm version
{
  '@tonclient/tests-node': '1.10.2',
  npm: '6.11.3',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  llhttp: '1.1.4',
  modules: '72',
  napi: '5',
  nghttp2: '1.39.2',
  node: '12.11.1',
  openssl: '1.1.1c',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.32.0',
  v8: '7.7.299.11-node.12',
  zlib: '1.2.11'
}

npx tsc --version
Version 4.0.3

tondev se info
Instance  State    Version  GraphQL Port  ArangoDB Port  Docker Container       Docker Image
--------  -------  -------  ------------  -------------  ---------------------  -----------------------
default   running  0.25     8080                         tonlabs-tonos-se-user  tonlabs/local-node:0.25

$env:USE_NODE_SE="true";$env:TON_NETWORK_ADDRESS="http://localhost:8080";node run
1.11.0
✓ Test versions compatibility (1 / 0)
✓ crypto (2 / 0)
✓ encode_message (3 / 0)
✓ net (4 / 0)
✓ Block signatures (5 / 0)
✓ All Accounts (6 / 0)
✓ Ranges (7 / 0)
✓ Wait For (8 / 0)
✓ Subscribe for transactions with addresses (ABIv1) (9 / 0)
✓ Subscribe for transactions with addresses (ABIv2) (10 / 0)
✓ Subscribe for messages (ABI v1) (11 / 0)
✓ Subscribe for messages (ABI v2) (12 / 0)
✓ Transactions with addresses (13 / 0)
✓ Check shard_hashes greater then 0 (14 / 0)
---
success: 14
failure: 0

@d3p thank you. It works fine!