-
Notifications
You must be signed in to change notification settings - Fork 1
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
ITZSHOAIB
committed
Sep 10, 2024
1 parent
ecba385
commit d824f51
Showing
11 changed files
with
110 additions
and
83 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Feature: Manage Posts on JSONPlaceholder API | ||
|
||
Scenario: Retrieve a list of posts | ||
Given a deployed "Lock" contract with "1893456000" arguments and "0.001" Ether | ||
Given a deployed "Counter" contract with "[10]" arguments and "0" Ether |
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
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 |
---|---|---|
@@ -1,19 +1,13 @@ | ||
import kleur from "kleur"; | ||
// import { execa } from "execa"; | ||
import { execSync } from "child_process"; | ||
import { log } from "../../utils/logger.js"; | ||
|
||
export const runTests = async () => { | ||
try { | ||
console.log(kleur.cyan("🚀 Running Cucumber tests...")); | ||
// console.log("🚀 Running Cucumber tests..."); | ||
const execa = (await import("execa")).execa; | ||
await execa("npx", ["cucumber-js"], { stdio: "inherit" }); | ||
// execSync("npx cucumber-js", { stdio: "inherit" }); | ||
console.log(kleur.green("✅ Tests completed successfully")); | ||
// console.log("✅ Tests completed successfully"); | ||
log("info", "🚀 Running Cucumber tests..."); | ||
execSync("npx cucumber-js", { stdio: "inherit" }); | ||
log("sucess", "✅ Tests completed successfully"); | ||
} catch (error) { | ||
console.error( | ||
kleur.red(`❌ Error during tests: ${(error as Error).message}`) | ||
); | ||
log("error", `❌ Error during tests: ${(error as Error).message}`); | ||
process.exit(1); | ||
} | ||
}; |
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,22 @@ | ||
import kleur from "kleur"; | ||
|
||
type LogType = "sucess" | "error" | "warning" | "info"; | ||
|
||
export const log = (type: LogType, message: string) => { | ||
switch (type) { | ||
case "sucess": | ||
console.log(kleur.green(message)); | ||
break; | ||
case "error": | ||
console.error(kleur.red(message)); | ||
break; | ||
case "warning": | ||
console.warn(kleur.yellow(message)); | ||
break; | ||
case "info": | ||
console.info(kleur.cyan(message)); | ||
break; | ||
default: | ||
console.log(message); | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.