Skip to content

WasmJs: Test runner swallows exceptions, preventing error message inspection #22

@himattm

Description

@himattm

Status: Blocked on upstream Wasm test runner fix

Description

7 tests in ErrorMessagePatternTest fail on WasmJs because the Wasm test runner intercepts AssertionError at a higher level than user code, preventing try-catch from capturing error messages. The captureErrorMessage() helper returns an empty string, causing all assertions on error message content to fail.

Assertion pass/fail behavior works correctly — only error message content inspection is affected. Parameter validation exceptions (IllegalArgumentException) work when caught inside runComposeUiTest.

Affected Tests

  • errorMessage_containsHeaderAndExpectedActual
  • errorMessage_containsSourceLocation
  • errorMessage_containsAllTrackedComposables
  • errorMessage_containsRecompositionTimeline
  • errorMessage_containsParentInfo
  • errorMessage_containsCausalityInfo
  • errorMessage_containsSemanticTree

Workaround

Tests are skipped on WasmJs with if (isWasmJs) return.

Resolution

Blocked on an upstream fix to the Kotlin/Wasm test runner's exception propagation. Remove the skip guards when the fix lands.

File: dejavu/src/commonTest/kotlin/dejavu/ErrorMessagePatternTest.kt

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked/upstreamBlocked on upstream dependency fixbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions