test cypress run

This commit is contained in:
tamasmagyar 2022-06-16 11:28:17 +02:00
parent 31c388a6e3
commit 986c03aecd
6 changed files with 45 additions and 8 deletions

View file

@ -508,6 +508,25 @@ exports.startUnitTest = async () => {
});
};
exports.startE2eTests = async () => {
console.log("Starting unit test...");
const npm = /^win/.test(process.platform) ? "npm.cmd" : "npm";
const child = childProcess.spawn(npm, [ "run", "cy:run" ]);
child.stdout.on("data", (data) => {
console.log(data.toString());
});
child.stderr.on("data", (data) => {
console.log(data.toString());
});
child.on("close", function (code) {
console.log("Jest exit code: " + code);
process.exit(code);
});
};
/**
* Convert unknown string to UTF8
* @param {Uint8Array} body Buffer