Skip to content

Commit f09bdbd

Browse files
committed
fix: Added detailed output to examples script
1 parent 94c7917 commit f09bdbd

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

tests/integration-tests/run-examples.ts

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,40 @@ async function runAllExamples(): Promise<void> {
6565

6666
const results = await Promise.all(files.map(runExample));
6767

68-
// Print results
68+
// Print results summary
6969
const successful = results.filter(r => r.success);
7070
const failed = results.filter(r => !r.success);
7171

72-
console.log(chalk.green(`\n✓ ${successful.length} examples passed`));
72+
console.log('\n=== Test Results Summary ===');
73+
console.log(chalk.green(`✓ ${successful.length} examples passed:`));
74+
successful.forEach(result => {
75+
const fileName = result.file.split('/').pop() || result.file;
76+
console.log(chalk.green(` ✓ ${fileName}`));
77+
});
7378

79+
if (failed.length > 0) {
80+
console.log(chalk.red(`\n✗ ${failed.length} examples failed:`));
81+
failed.forEach(result => {
82+
const fileName = result.file.split('/').pop() || result.file;
83+
console.log(chalk.red(` ✗ ${fileName}`));
84+
});
85+
}
86+
87+
// Detailed output section
7488
if (successful.length > 0) {
75-
console.log('\nSuccessful examples output:');
89+
console.log('\n=== Successful Examples Output ===');
7690
successful.forEach(result => {
77-
console.log(chalk.green(`\n${result.file}:`));
91+
const fileName = result.file.split('/').pop() || result.file;
92+
console.log(chalk.green(`\n[${fileName}]:`));
7893
console.log(chalk.gray(result.output));
7994
});
8095
}
8196

8297
if (failed.length > 0) {
83-
console.log(chalk.red(`\n✗ ${failed.length} examples failed:`));
98+
console.log('\n=== Failed Examples Details ===');
8499
failed.forEach(result => {
85-
console.log(chalk.red(`\n${result.file}:`));
100+
const fileName = result.file.split('/').pop() || result.file;
101+
console.log(chalk.red(`\n[${fileName}]:`));
86102
console.log(chalk.gray(result.error));
87103
if (result.output) {
88104
console.log('\nOutput:');

0 commit comments

Comments
 (0)