-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: poc test solution #116
Conversation
In the meantime, you can test the code manually by running the code in [development mode](#run-in-development-mode). | ||
|
||
### CLI tests | ||
|
||
To run CLI tests for zksync-cli do the following: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't found test-related packages in package.json.
Probably, it's better to use either a separate package.json in the test folder with the necessary packages for the test run (or add some pre-test script to the main package.json).
I think having the necessary modules described in the package.json file is a good approach. Accordingly to this approach, we don't need to install modules in the hand mode for the local run (and before reading the Readme.MD file just for running tests). So the test run would be simpler locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abilevych are you about jest /shelljs and similar test related packages in a separate package.json? If yes - I had such separate file in this test folder in the very beginning (796831a), @vasyl-ivanchuk asked me to merge them with main package.json and remove them from the test folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now installation process updated, we have to use build step instead of installing a package separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please let me know if now everything looks good now. @JackHamer09 fyi
README.md
Outdated
1. Go to [test](`./test`) folder | ||
2. Run `npm i` and install zksync-cli `npm i zksync-cli` | ||
3. Make sure you have [Docker](https://docs.docker.com/engine/install/) on your system. | ||
4. Make sure you have `.env` file with your wallet private key in `./test/src/` dir. Key is `E2E_TESTNET_PK`. It may looks like `E2E_TESTNET_PK=012345...abcdef` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest creating that file as the .env.local or just .env. And it needs to contain a proper fields with stubs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a .env.example and updated the description
package.json
Outdated
"commitlint": "commitlint --edit" | ||
"lint": "eslint . --ext ./{src,test}/* --fix --ignore-path .gitignore --no-error-on-unmatched-pattern --max-warnings=0", | ||
"commitlint": "commitlint --edit", | ||
"test": "jest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm suggesting to add here the --verbose flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
test/common.test.ts
Outdated
}); | ||
|
||
//id1874 | ||
describe("User can call read method from deployed contract on network", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this, I was able to reproduce, on a clean environment. I have specified path to .env now it works for me. Could you please try again?
Also which zksync-cli --version do you see?, it should be 1.2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is the 0.11.0 version appears.
Considering that I've been carefully going through the FAQ steps, I shouldn't face that.
Can you align the pre-requisite steps to avoid that with installing/using the working CLI version by default?
e2ab36f
to
4c4a57b
Compare
8b85a29
to
72e8084
Compare
be79487
to
97ffdd4
Compare
What π»
Proof of concept (POC) test solution for CLI
Why β
To verify CLI output
Evidence π·
n/a
Notes π
n/a