entropyxyz / cli

CLI utility to ease interactions with an Entropy network.
GNU Affero General Public License v3.0
5 stars 0 forks source link

balance testing #130

Closed mixmix closed 1 week ago

mixmix commented 2 weeks ago

WIP

Depends on : https://github.com/entropyxyz/sdk/pull/389

closes #121

mixmix commented 2 weeks ago

@rh0delta if you yarn link in that associated SDK PR ... then try to run the tests you will see:

yarn run v1.22.1
$ yarn test:types && yarn test:ts && yarn test:only
$ tsc --project tsconfig.json
tests/balance.test.ts:4:21 - error TS2307: Cannot find module '@entropyxyz/sdk/keys' or its corresponding type declarations.

4 import Keyring from '@entropyxyz/sdk/keys'
                      ~~~~~~~~~~~~~~~~~~~~~~

tests/testing-utils/index.ts:1:49 - error TS2307: Cannot find module '@entropyxyz/sdk/dev/testing-utils.mjs' or its corresponding type declarations.

1 import { spinNetworkUp, spinNetworkDown, } from "@entropyxyz/sdk/dev/testing-utils.mjs"
                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I think the problem is our moduleResoltion in tsconfig .... like it's set to some old value node when it should be something newer? I dunno, it's a nightmare https://stackoverflow.com/questions/70296652/how-can-i-use-exports-in-package-json-for-nested-submodules-and-typescript

rh0delta commented 2 weeks ago

@rh0delta if you yarn link in that associated SDK PR ... then try to run the tests you will see:

yarn run v1.22.1
$ yarn test:types && yarn test:ts && yarn test:only
$ tsc --project tsconfig.json
tests/balance.test.ts:4:21 - error TS2307: Cannot find module '@entropyxyz/sdk/keys' or its corresponding type declarations.

4 import Keyring from '@entropyxyz/sdk/keys'
                      ~~~~~~~~~~~~~~~~~~~~~~

tests/testing-utils/index.ts:1:49 - error TS2307: Cannot find module '@entropyxyz/sdk/dev/testing-utils.mjs' or its corresponding type declarations.

1 import { spinNetworkUp, spinNetworkDown, } from "@entropyxyz/sdk/dev/testing-utils.mjs"
                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I think the problem is our moduleResoltion in tsconfig .... like it's set to some old value node when it should be something newer? I dunno, it's a nightmare https://stackoverflow.com/questions/70296652/how-can-i-use-exports-in-package-json-for-nested-submodules-and-typescript

this has been fixed with edits made in the connected PR on the sdk repo https://github.com/entropyxyz/sdk/pull/389