Files
bun.sh/test/js
Claude Bot d7548c7eb5 WIP: Implement expect.soft for Bun test runner
This implements expect.soft similar to Vitest, where soft assertions
collect errors without stopping test execution.

Implementation:
- Added is_soft field to Expect and ExpectStatic structs
- Added soft_errors ArrayList to ExecutionSequence to collect errors
- Modified Expect.throw() to collect soft errors instead of throwing
- Added soft error reporting in onSequenceCompleted()
- Created getSoft() getters for chaining (expect.soft, expect.soft.not, etc.)
- Updated jest.classes.ts to expose soft getter

Current Status:
The core logic is implemented but there's an architectural issue with
making ExpectStatic callable from JavaScript. The error collection,
storage, and reporting mechanisms are all in place and working.

What works:
- Soft error collection in Zig code
- Error storage per test sequence
- Test failure marking when soft errors exist
- Chaining with .not, .resolves, .rejects

What needs fixing:
- ExpectStatic needs to be callable from JS (currently returns instance but not callable)
- May need alternative approach to expose expect.soft as a function

The implementation matches Vitest's UX design but needs JS/Zig binding work.
2025-10-12 14:49:35 +00:00
..
2024-12-12 02:07:29 -08:00