Skip to content

Conversation

@s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Oct 23, 2025

  • Migrated from Jest done callback to Promise-based async test pattern
  • Fixed test assertion by adding missing </head> tag to trigger getTraceMetaTags call (the test did not work before as getTraceMetaTags is only called when there is a closing head tag
  • Corrected stream piping logic to properly test transformer functionality
    The getMetaTagTransformer function internally pipes the transformer TO the bodyStream (htmlMetaTagTransformer.pipe(body)). So the correct flow is:
    1. Write data to the transformer
    2. Transformer processes it and pipes to bodyStream
    3. Read the output from bodyStream

@cursor
Copy link

cursor bot commented Oct 23, 2025

Bug: Test Logic Mismatch: Head Tag Presence Affects Meta Injection

The test "should not modify chunks without head closing tag" has inconsistent logic. It provides HTML with a </head> tag and expects meta tag injection, which contradicts its name and the behavior it's meant to verify (no modification when </head> is absent). This leaves the 'no </head> tag' scenario untested.

Fix in Cursor Fix in Web

@s1gr1d s1gr1d force-pushed the sig/fix-rr-test-getMetaTagTransformer branch from e2557af to 5d76a7f Compare October 23, 2025 12:43
@cursor
Copy link

cursor bot commented Oct 23, 2025

Bug: Test Mismatch: Head Tag Presence vs. Meta Injection

The test "should not modify chunks without head closing tag" now uses HTML input containing a head tag and expects meta tag injection. This contradicts the test name and leaves the scenario of HTML without a head closing tag untested.

Fix in Cursor Fix in Web

@s1gr1d s1gr1d force-pushed the sig/fix-rr-test-getMetaTagTransformer branch from 71f1fb6 to d44cc20 Compare October 23, 2025 14:12
@s1gr1d s1gr1d enabled auto-merge (squash) October 23, 2025 14:12
@s1gr1d s1gr1d merged commit 9c0397c into develop Oct 23, 2025
39 checks passed
@s1gr1d s1gr1d deleted the sig/fix-rr-test-getMetaTagTransformer branch October 23, 2025 14:33
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.

3 participants