Skip to content

kg: ExploreGraph.test.ts — 3 tests skipped pending Vue 3.5 hoisting workaround #694

Closed

Description

@jung-thomas

Follow-up from PR #687 (Track 3-B).

Context

Three tests in app/explore/src/__tests__/ExploreGraph.test.ts are .skip'd because they assert on mockSigmaInstances[0] / mockGraphInstances[0], which are populated only when ExploreGraph's onMounted hook actually instantiates Sigma + Graph.

Under Vue 3.5.34 + @vue/test-utils 2.4.10 + happy-dom 15, the container template-ref resolves to null at onMounted time because Vue's SFC compiler hoists the static <div ref="container"> vnode and refs can't be attached to hoisted vnodes. The :data-graph-id workaround that defeats hoisting on other components doesn't trip the inner ref binding here.

Skipped tests

  • deduplicates duplicate edges by key
  • emits nodeClick when Sigma fires clickNode
  • overlays path edges in highlight color when path prop is set

Production impact

None. Vue's hoisting only breaks ref attachment under @vue/test-utils' mounting strategy. Real page loads work.

Suggested fix

Migrate container from string ref to callback ref (:ref="setContainer"), OR use useTemplateRef() (Vue 3.5+), OR wait for @vue/test-utils 2.5+.

Refs PR #687

Activity

  1. added 2 commits that reference this issue on Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions