UNPKG

artes

Version:

The simplest way to automate UI and API tests using Cucumber-style steps.

29 lines (25 loc) โ€ข 656 B
const { spawnSync } = require("child_process"); const { moduleConfig } = require("../imports/commons"); function runTests() { try { console.log("๐Ÿงช Running tests..."); spawnSync("cucumber-js", ["--config=cucumber.config.js"], { cwd: moduleConfig.modulePath, stdio: "inherit", shell: true, env: { ...process.env, FORCE_TTY: "1", FORCE_COLOR: "1", CI: "false", }, }); console.log("โœ… Tests running completed successfully!"); } catch (error) { console.error("โŒ Test execution failed:", error); process.env.EXIT_CODE = 1; } } module.exports = { runTests, };