UNPKG

artes

Version:

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

31 lines (27 loc) โ€ข 730 B
const { spawnSync } = require("child_process"); const { moduleConfig } = require("../imports/commons"); function runTests() { try { console.log("๐Ÿงช Running tests..."); process.env.FORCE_COLOR = "1"; process.env.FORCE_STDIO_TTY = "1"; 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, };