Skip to content

Commit

Permalink
test: fix path issue and refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
pcheremu committed Jan 30, 2024
1 parent 090d0d9 commit f64c8f0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ To run CLI tests for zksync-cli do the following:
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`
5. Run `npm test`
4. Rename `.env.example` to `.env` in `./test/src/` dir and add your wallet private key to this file. F.e.: It may looks like `E2E_TESTNET_PK=012345...abcdef`
5. Run `npm run test`

## 🌍 Official Links

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"typecheck": "tsc -p . --noEmit",
"lint": "eslint . --ext ./{src,test}/* --fix --ignore-path .gitignore --no-error-on-unmatched-pattern --max-warnings=0",
"commitlint": "commitlint --edit",
"test": "jest"
"test": "jest --verbose"
},
"keywords": [
"zksync",
Expand Down
4 changes: 2 additions & 2 deletions test/common.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ describe("Check wallet balance of specified address", () => {
});

//id1718
xdescribe("Specific package can be updated using zksync-cli dev update <module name>", () => {
xdescribe("Specific package can be updated using zksync-cli dev update module name", () => {
// need to find out the way how to make "npx zksync-cli dev start"

it("npx zksync-cli dev update <module>", () => {
it("npx zksync-cli dev update module", () => {
const command = "npx zksync-cli dev update zkcli-portal";
const result = executeCommand(command);
expect(result.output).toMatch(/(Updating module)/i);
Expand Down
1 change: 1 addition & 0 deletions test/src/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
E2E_TESTNET_PK=
3 changes: 2 additions & 1 deletion test/src/entities.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as dotenv from "dotenv";
import * as path from "path";

dotenv.config();
dotenv.config({path: path.resolve(__dirname, ".env")});

export const adresses = {
sepoliaTestnet: "0x52B6d10d7d865B3d4103f8809AA3521288568f46",
Expand Down

0 comments on commit f64c8f0

Please sign in to comment.