Skip to content

πŸ§ͺ test(ui-v2): add unit tests for isSandboxPreviewGuestHost - #20

Merged
jasandroidx merged 1 commit into
ravenstackfrom
test-sandbox-preview-guest-host-1466109816257701517
Sep 7, 2026
Merged

jasandroidx merged 1 commit into
ravenstackfrom
test-sandbox-preview-guest-host-1466109816257701517

Conversation

@jasandroidx

Copy link
Copy Markdown
Owner

🎯 What: Added unit tests for the previously untested isSandboxPreviewGuestHost function in ui-v2/src/lib/preview-embedder-origin.ts to improve test coverage and reliability. Also updated the package.json test script to correctly discover and run .test.ts files alongside existing .test.mjs files using Node's native test runner with --experimental-strip-types.

πŸ“Š Coverage: The new tests cover:

  • Exact string matches ("grok-sandbox.com")
  • Case-insensitivity ("GROK-SANDBOX.COM")
  • Valid subdomains ("sub.grok-sandbox.com", "a.b.grok-sandbox.com")
  • Invalid/negative domains ("grok.com", "mygrok-sandbox.com", "grok-sandbox.com.org", "example.com")

✨ Result: Test coverage for ui-v2/src/lib/preview-embedder-origin.ts is now improved and regressions on URL origin detection logic can be prevented. All tests pass natively using npm test.


PR created automatically by Jules for task 1466109816257701517 started by @jasandroidx

…test script

Co-authored-by: jasandroidx <77057656+jasandroidx@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant