unum-cloud / usearch

Fast Open-Source Search & Clustering engine × for Vectors & 🔜 Strings × in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and Wolfram 🔍
https://unum-cloud.github.io/usearch/
Apache License 2.0
2.27k stars 142 forks source link

test: usearch-js expected results #303

Closed jlarmstrongiv closed 1 year ago

jlarmstrongiv commented 1 year ago

Test example code

The BigUint64Array and Float32Array have a length of 10, not 1

  AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:

  BigUint64Array(10) [
    42n,
    0n,
    0n,
    0n,
    0n,
    0n,
    0n,
    0n,
    0n,
    0n
  ]

  should loosely deep-equal

  BigUint64Array(1) [
    42n
  ]
      at TestContext.<anonymous> (/Users/jlarmst/Desktop/typefoundriesdirect/usearch/javascript/usearch.test.js:46:10)
      at Test.runInAsyncScope (node:async_hooks:203:9)
      at Test.run (node:internal/test_runner/test:573:25)
      at Test.processPendingSubtests (node:internal/test_runner/test:318:18)
      at Test.postRun (node:internal/test_runner/test:642:19)
      at Test.run (node:internal/test_runner/test:601:10)
      at async startSubtest (node:internal/test_runner/harness:202:3) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: BigUint64Array(10) [
      42n, 0n, 0n, 0n, 0n,
       0n, 0n, 0n, 0n, 0n
    ],
    expected: BigUint64Array(1) [ 42n ],
    operator: 'deepEqual'
  }
ashvardanian commented 1 year ago

:tada: This PR is included in version 2.8.9 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: