Repository navigation
test(server): pin the console collector contract - ConsoleCollector (Closes #1663) - #1917
Merged
Merged
Conversation
The first suite for browser/console-collector.ts: the class exercised (10 tests) through a recording fake CdpBackend - the three event kinds with their level maps and arg serialization, the main-frame navigation clear, session attach/re-attach/detach, and the getLogs severity threshold (measured: the default hides debug), search, recency limit, totalCount and clear. No mocks, no network, database or container; the subject is untouched. Closes #1663
β Tests passed β 3482/3552
|
Collaborator
Author
|
Checks note, before merge:
Dmitrii Fedorov (@dmitrii-f-t27) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1663
What changed
One new file:
trios/agent-server/apps/server/tests/api/console-collector.test.ts(the path the issue's Success Criteria names). The subjectbrowser/console-collector.tsis untouched.The single exported class is exercised (10
it(blocks) through a recording fake CdpBackend whose handlers the suite invokes directly:getLogs(2 tests): the severity threshold (measured: the default is 'info', so debug-level entries are hidden unless asked for), the case-insensitive search, combined filters; and the recency limit (60 entries -> the last 50, the honest totalCount of 60) with the optional clear.The suite registers no mocks. No network, database or container.
How it was verified (FR-004)
10 pass / 0 fail / 26 expect() calls, Ran 10 tests across 1 file.6 failout of 10, quoted raw above. The subject was restored byte-identical (git checkout) and the suite passes again.biome ci-clean (checked with an explicit Found/error grep - the noNonNullAssertion warnings of the first draft led to the fire() helper) and contributes no typecheck error (local monorepo typecheck: base set, 0 mentions of the new file). The one-process run with the four sibling api suites is 41/41; the full tests/api run shows only the 8 pre-existing local vault failures (ageis not installed on this machine - CI installs it, see PR ci(test): install age where the vault's tests start it, before the vault shipΒ #1782).Not verified
Tests / server-apijob re-runs the suite on this SHA.Dmitrii Fedorov (@dmitrii-f-t27)