Skip to content

[Test Infra] Investigate coverage instrumentation visibility for dynamically evaluated synthutils.js tests #7324

Description

@mahesh-09-12

Summary

While reviewing existing testing infrastructure and regression coverage behavior, I observed that synthutils.js currently reports 0% coverage despite having an existing test suite introduced in #4210.

Observation

From reviewing the current setup, the synthutils tests appear to dynamically evaluate implementation code using runtime wrappers (new Function(...)) and manually inject globals/browser state instead of loading the implementation through standard Jest module instrumentation paths.

Because of this, the current runtime evaluation approach may execute behavior correctly while limiting Istanbul/Jest instrumentation visibility into synthutils.js execution paths.

Why this matters

This creates a potential mismatch between:

  • existing behavior validation
  • measurable/instrumented coverage visibility
  • long-term testing reliability and maintainability

Accurate instrumentation visibility becomes increasingly important for:

  • trustworthy coverage reporting
  • identifying genuinely untested execution paths
  • future mutation-testing efforts
  • long-term testing infrastructure improvements

Context

The current setup was likely introduced to accommodate legacy runtime/global dependency behavior in synthutils.js, so this issue is not intended to suggest that the existing tests are incorrect or ineffective.

The goal is to better understand whether the current instrumentation visibility limitations are:

  • expected tradeoffs of the current architecture
  • tooling-related limitations
  • or areas where future infrastructure improvements may help

Goal of this issue

This issue is intended as a discussion/investigation point before proposing implementation changes.

Questions worth discussing:

  • Is the current dynamic evaluation approach still the preferred testing strategy for synthutils.js?
  • Are there existing constraints preventing more direct instrumentation visibility?
  • Would alternative loading/instrumentation strategies improve reliability without destabilizing existing tests?

Notes

This is primarily an investigation into instrumentation visibility and testing infrastructure behavior, rather than a report of functional test failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions