-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { executeCommand } from "./src/helper"; | ||
|
||
|
||
describe("Check zksync-cli dev", () => { | ||
|
||
it("npx zksync-cli dev config", () => { | ||
const 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 = "npx zksync-cli dev start"; | ||
const result1 = executeCommand(command); | ||
console.log("first run:" + result1.output); | ||
const result2 = executeCommand(command); | ||
console.log("first run:" + result2.output); | ||
expect(result2.exitCode).toBe(0); | ||
}); | ||
|
||
//id1718 | ||
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); | ||
expect(result.exitCode).toBe(0); | ||
}); | ||
|
||
it("npx zksync-cli dev restart", () => { | ||
const command = "npx zksync-cli dev restart"; | ||
const result = executeCommand(command); | ||
// console.log(result.output); | ||
expect(result.exitCode).toBe(0); | ||
}); | ||
|
||
it("npx zksync-cli dev stop", () => { | ||
const command = "npx zksync-cli dev stop"; | ||
const result = executeCommand(command); | ||
// console.log(result.output); | ||
expect(result.exitCode).toBe(0); | ||
}); | ||
}); |