From d1d977326ab253b96057d739429be53948c99ead Mon Sep 17 00:00:00 2001 From: pcheremu Date: Mon, 11 Mar 2024 16:37:49 +0100 Subject: [PATCH] test: add windows --- .github/workflows/test-cli.yml | 4 ++-- test/common.test.ts | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-cli.yml b/.github/workflows/test-cli.yml index cb92e24..e636800 100644 --- a/.github/workflows/test-cli.yml +++ b/.github/workflows/test-cli.yml @@ -18,7 +18,7 @@ jobs: docker: image: docker:latest - name: 'Node ${{ matrix.node-version }}' + name: 'Linux + Node ${{ matrix.node-version }}' steps: - uses: actions/checkout@v4 @@ -53,7 +53,7 @@ jobs: ] runs-on: windows-latest - name: 'Node ${{ matrix.node-version }}' + name: 'Windows + Node ${{ matrix.node-version }}' steps: - uses: actions/checkout@v4 diff --git a/test/common.test.ts b/test/common.test.ts index 149a162..c69bd7c 100644 --- a/test/common.test.ts +++ b/test/common.test.ts @@ -169,8 +169,21 @@ describe("Dev tests", () => { // describe("Check zksync-cli dev", () => { + + it("npx zksync-cli dev config", () => { + let command: string; + if( process.platform === "win32" ) { + command = "echo y | npx zksync-cli dev config" + } else { + command = "yes | npx zksync-cli dev config"; + } + const result = executeCommand(command); + console.log(result.output); + expect(result.exitCode).toBe(0); + }); + it("npx zksync-cli dev start", () => { - const command = "yes | npx zksync-cli dev start"; + const command = "npx zksync-cli dev start"; const result = executeCommand(command); // console.log(result.output); expect(result.exitCode).toBe(0);