mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-14 19:55:03 +01:00
more
This commit is contained in:
parent
08ba799d23
commit
f860714b2b
9 changed files with 64 additions and 24 deletions
|
|
@ -21,3 +21,8 @@ await channel.sendToQueue('consume-queue-1415', Buffer.from('STOP'));
|
|||
console.log('Sent STOP message to queue');
|
||||
|
||||
await consumePromise;
|
||||
|
||||
console.log('Received STOP!');
|
||||
|
||||
await channel.close();
|
||||
await connection.close();
|
||||
|
|
|
|||
|
|
@ -26,12 +26,19 @@ function maybeDone() {
|
|||
for (const success of successes) {
|
||||
console.log(`✔️ Test ${success} successful`);
|
||||
}
|
||||
for (const { name, stderr } of failures) {
|
||||
for (const { name, stdout, stderr } of failures) {
|
||||
console.log(
|
||||
`------------------- stderr test ${name} -------------------`
|
||||
`------------------- start stdout test ${name} -------------------`
|
||||
);
|
||||
console.log(stdout);
|
||||
console.log(
|
||||
`-------------------- end stdout test ${name} --------------------`
|
||||
);
|
||||
console.log(
|
||||
`------------------- start stderr test ${name} -------------------`
|
||||
);
|
||||
console.log(stderr);
|
||||
console.log(`------------------- stderr test ${name} -------------------
|
||||
console.log(`-------------------- end stderr test ${name} --------------------
|
||||
❌ Test ${name} failed`);
|
||||
}
|
||||
|
||||
|
|
@ -42,11 +49,11 @@ function maybeDone() {
|
|||
}
|
||||
|
||||
function runTest(path, name) {
|
||||
childProcess.exec(`node ${path}`, {}, (error, _, stderr) => {
|
||||
childProcess.exec(`node ${path}`, {}, (error, stdout, stderr) => {
|
||||
if (!error) {
|
||||
successes.push(name);
|
||||
} else {
|
||||
failures.push({ name, stderr });
|
||||
failures.push({ name, stdout, stderr });
|
||||
}
|
||||
done += 1;
|
||||
maybeDone();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue