Skip to content

Conversation

@SteveSandersonMS
Copy link
Contributor

This PR adds tests for the session event subscription feature across all SDK languages, following up on PR #11.

Changes

  • Rename .NET test to Should_Receive_Session_Events
  • Add equivalent tests for Node.js, Python, and Go SDKs
  • Add snapshot file for test replay

Test Coverage

All tests verify user.message, assistant.message, and session.idle events are received, plus assert the response contains 300.

Closes #12

- Rename .NET test from Should_SessionEvt_Subscribed to Should_Receive_Session_Events
- Add equivalent tests for Node.js, Python, and Go SDKs
- Add shared snapshot file for test replay
- Change prompt to 'What is 100+200?'
- Assert assistant response contains '300'
- Regenerate snapshot file
@SteveSandersonMS SteveSandersonMS requested a review from a team as a code owner January 15, 2026 15:55
Copilot AI review requested due to automatic review settings January 15, 2026 15:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive test coverage for session event subscription functionality across all SDK languages (Node.js, Python, Go, and .NET). The tests verify that SDKs properly receive and handle user.message, assistant.message, and session.idle events.

Changes:

  • Renamed .NET test from Should_SessionEvt_Subscribed to Should_Receive_Session_Events for clarity
  • Added session event subscription tests for Node.js, Python, and Go SDKs
  • Added test snapshot file for replay testing with a simple arithmetic question (100+200=300)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/snapshots/session/should_receive_session_events.yaml Snapshot file for test replay with 100+200 arithmetic test case
python/e2e/test_session.py Added Python async test with event collection and idle event handling
nodejs/test/e2e/session.test.ts Added Node.js test with Promise-based event handling and timeout
go/e2e/session_test.go Added Go test with channel-based event handling and proper synchronization
dotnet/test/SessionTests.cs Renamed test method and updated prompt to match other SDKs; added response verification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SteveSandersonMS SteveSandersonMS added this pull request to the merge queue Jan 15, 2026
Merged via the queue into main with commit b8a836b Jan 15, 2026
22 checks passed
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.

session.On doesn't work in C# code

3 participants