feat(tstest): Enhance tstest with fluent API, suite grouping, tag filtering, fixture & snapshot testing, and parallel execution improvements
This commit is contained in:
32
test/tapbundle/test.fluent-syntax.ts
Normal file
32
test/tapbundle/test.fluent-syntax.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { tap, expect } from '../../ts_tapbundle/index.js';
|
||||
|
||||
// Test with fluent syntax
|
||||
tap.tags('unit', 'fluent')
|
||||
.priority('high')
|
||||
.test('test with fluent syntax', async (toolsArg) => {
|
||||
expect(true).toBeTrue();
|
||||
toolsArg.context.set('fluentTest', 'works');
|
||||
});
|
||||
|
||||
// Chain multiple settings
|
||||
tap.tags('integration')
|
||||
.priority('low')
|
||||
.retry(3)
|
||||
.timeout(5000)
|
||||
.test('test with multiple settings', async (toolsArg) => {
|
||||
expect(true).toBeTrue();
|
||||
});
|
||||
|
||||
// Test context access from fluent test
|
||||
tap.tags('unit')
|
||||
.test('verify fluent context', async (toolsArg) => {
|
||||
const fluentValue = toolsArg.context.get('fluentTest');
|
||||
expect(fluentValue).toEqual('works');
|
||||
});
|
||||
|
||||
// Test without tags - should show all tests run without filtering
|
||||
tap.test('regular test without tags', async (toolsArg) => {
|
||||
expect(true).toBeTrue();
|
||||
});
|
||||
|
||||
tap.start();
|
Reference in New Issue
Block a user