Skip to content

Conversation

@TanmayRanaware
Copy link
Contributor

fixes #31
Test coverage:
ClosedSink function and Closed explicit sink
Dialog element closing functionality
Boolean attribute values (true/false)
Promise and observable sources
Edge cases and integration scenarios

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

silky-x0 and others added 7 commits October 2, 2025 23:26
- Created BDD-style test suite following existing patterns
- Tests cover ClosedSink function and Closed explicit sink
- Includes dialog element closing functionality tests
- Tests boolean attribute value handling (true/false)
- Covers future/promise and observable sources
- Includes edge cases and integration scenarios
- Validates sink configuration structure
- Uses custom MockDialogElement for HTMLDialogElement testing
TanmayRanaware added 6 commits October 2, 2025 23:30
- Remove 'To Busy to read?, Check [TL;DR 📜](./QUICKSTART.md)' line from README
- Delete QUICKSTART.md file completely
- Clean up documentation structure
…iple

- Split multiple actions into individual tests
- Each test now has clear cause and effect
- Better test isolation and debugging
- More descriptive test names
- Follows best practices for test organization
- Change 'closes dialog' to 'calls dialog.close()' in test names
- Add comments explaining dialog.close() has no parameters
- Clarify that there's no 'unclose' functionality
- Each call to sink() results in dialog.close() being called regardless of input
- Add expectSinkBindingConfiguration helper function to test-support.ts
- Replace repetitive sink configuration assertions with shared helper
- Improve test maintainability and reduce code duplication
- Helper can be reused across all sink tests
- Remove parameters from ClosedSink calls (sink doesn't take parameters)
- Remove redundant test for source reference preservation
- Remove unrelated swap-source.test.ts file from closed-sink PR
- Simplify tests to focus on actual ClosedSink behavior
- Clean up test structure and remove unnecessary complexity
This file exists in master but was accidentally removed from this branch.
Restoring it to maintain consistency with master branch.
- Remove redundant test for basic sink invocation
- Remove redundant test for multiple calls
- Remove redundant test for separate bindings
- Keep only essential tests that add value
- Focus on core functionality rather than exhaustive parameter testing
@dariomannu dariomannu merged commit 5a75b81 into ReactiveHTML:master Oct 3, 2025
@dariomannu
Copy link
Contributor

Amazing, that's merged now!

@TanmayRanaware
Copy link
Contributor Author

thenks @dariomannu for the great code reviweing. Liked the way you guided. Looking forward to solve more issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit test for the "Closed" Sink

3 participants