Skip to content

Conversation

@mag123c
Copy link
Contributor

@mag123c mag123c commented Nov 28, 2025

Test code verify that the second listener was actually called

Fixed #47

Changes

Before:
The test "should not be affected by listener errors" in test/entity.spec.ts has an unused variable that Biome flagged with underscore prefix (_successCallCount).

After:
Test code verify that the second listener was actually called

expect(() => {
  user.updateProfile({ bio: "New bio" });
}).toThrow("Listener error");

expect(user.state.bio).toBe("New bio");
// Add assertion to verify second listener execution
expect(successCallCount).toBe(1);

@mag123c mag123c marked this pull request as ready for review November 28, 2025 01:14
@mag123c mag123c force-pushed the fix/verify-second-listener-called branch from 0c4c5a2 to 4ef8b78 Compare November 28, 2025 01:16
@mag123c
Copy link
Contributor Author

mag123c commented Nov 28, 2025

In the direction of removing subscription(), close this PR.

@mag123c mag123c closed this Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test doesn't verify that second listener is called despite first listener error

1 participant