feat(logging): Display failed test console logs in default mode

This commit is contained in:
2025-05-15 19:40:46 +00:00
parent 553d5f0df7
commit 42cd08eb1c
7 changed files with 328 additions and 38 deletions

View File

@ -0,0 +1,23 @@
import { expect, tap } from '@push.rocks/tapbundle';
tap.test('Test that will fail with console logs', async () => {
console.log('Starting the test...');
console.log('Doing some setup work');
console.log('About to check assertion');
const value = 42;
console.log(`The value is: ${value}`);
// This will fail
expect(value).toEqual(100);
console.log('This log will not be reached');
});
tap.test('Test that passes', async () => {
console.log('This test passes');
console.log('So these logs should not show in default mode');
expect(true).toBeTrue();
});
tap.start();