bitsongofficial / bitsongjs

A series of useful Javascript libraries for BitSong
Apache License 2.0
4 stars 2 forks source link

test failed #72

Closed forbesus closed 4 months ago

forbesus commented 4 months ago

I just yarn test but i am getting above error

yarn run v1.22.21
$ lerna run test
lerna notice cli v5.5.1
lerna info versioning independent

    ×  @bitsongjs/utils:test
$ jest
 FAIL  test/merkledrop.spec.ts
  ● Test suite failed to run

    Jest encountered an unexpected token

    Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not 
configured to support such syntax.

    Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

    By default "node_modules" folder is ignored by transformers.       

    Here's what you can do:
     • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
     • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
     • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     • If you need a custom transformation specify a "transform" option in your config.
     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.   

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/configuration
    For information about custom transformations, see:
    https://jestjs.io/docs/code-transformation

    Details:

    D:\1-work\working\React Native\Bitsong\bitsongjs\packages\utils\dist\index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export * from './types';

               ^^^^^^

    SyntaxError: Unexpected token 'export'

    > 1 | import { Merkledrop } from '../dist';
        | ^
      2 | import { accounts } from './config';
      3 |
      4 | let merkledrop: Merkledrop;

      at Runtime.createScriptFromCode (../../node_modules/jest-runtime/build/index.js:1796:14)
      at Object.<anonymous> (test/merkledrop.spec.ts:1:1)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        2.687 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about 
this command.

 —————————————————————————————————————————————————————————————————————

 >  Lerna (powered by Nx)   Ran target test for 2 projects (6s)

    √    0/1 succeeded [0 read from cache]

    ×    1/1 targets failed, including the following:
         - @bitsongjs/utils:test

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
angelorc commented 4 months ago

It's highly likely that the tests are failing. However, I recommend using the telescope branch or the latest available tag instead https://github.com/bitsongofficial/bitsongjs/releases/tag/%40bitsongjs%2Ftelescope%403.0.0-dev.23

In any case, how can I assist you?

forbesus commented 4 months ago

I can't find telescope docs which means i can't find how to use it

forbesus commented 4 months ago

And I am getting error when I run yarn test @angelorc

angelorc commented 4 months ago

As I mentioned earlier, it's highly likely that the tests need to be fixed. I'm currently working on the Telescope branch (which is why you can't find any documentation), but if you explain what you're trying to do, I can guide you on how to do it using the telescope branch.

forbesus commented 4 months ago

I see what you mean I thought development is completed

Thank you @angelorc

angelorc commented 4 months ago

I'm curious, what do you aim to achieve? Are you looking to create a bot or an app? I'd be happy to help

forbesus commented 4 months ago

I want to make bot

angelorc commented 4 months ago

Great, if you want to create a bot, I can assist you in both go and js, as I already have some ready-made examples. If you're interested, feel free to message me on Telegram (@bitangel84) and I'll guide you through the steps to follow