mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 12:44:43 +00:00
testing: add LogFilter utility for scoped log suppression
This commit is contained in:
@@ -133,9 +133,8 @@ test "MCP.router - handleMessage - synchronous unit tests" {
|
||||
|
||||
// 4. Parse error
|
||||
{
|
||||
const old_filter = log.opts.filter_scopes;
|
||||
log.opts.filter_scopes = &.{.mcp};
|
||||
defer log.opts.filter_scopes = old_filter;
|
||||
const filter: testing.LogFilter = .init(.mcp);
|
||||
defer filter.deinit();
|
||||
|
||||
try handleMessage(server, aa, "invalid json");
|
||||
try testing.expectJson("{\"id\": null, \"error\": {\"code\": -32700}}", out_alloc.writer.buffered());
|
||||
|
||||
Reference in New Issue
Block a user