Files
DiscordChatExporter/DiscordChatExporter.Cli.Tests
Copilot dd7196b6a5 Resolve thread mentions on demand (#1480)
* Initial plan

* Fix unresolved thread mentions in HTML export (#1261)

- Add TryGetChannelAsync to DiscordClient for on-demand channel/thread lookup
- Add PopulateChannelAsync to ExportContext with negative caching
- Update HtmlMarkdownVisitor to resolve thread mentions on demand

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Refactor GetChannelAsync to use TryGetChannelAsync for parent resolution

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Add test for thread mention resolution in HTML export

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Apply PopulateChannelAsync to PlainTextMarkdownVisitor; add JSON thread mention test

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
2026-02-21 23:21:47 +02:00
..
2026-01-01 20:40:37 +02:00
2025-11-24 17:58:06 +02:00
2023-02-11 23:12:15 +02:00

DiscordChatExporter Tests

This test suite runs against a real Discord server, specifically created to exercise different behaviors required by the test scenarios. In order to run these tests locally, you need to join the test server and configure your authentication token.

  1. Join the test server
  2. Locate your Discord authentication token
  3. Add your token to user secrets: dotnet user-secrets set DISCORD_TOKEN <token>
  4. Run the tests: dotnet test

Note

If you want to add a new test case, please let me know and I will give you the required permissions on the server.