Skip to content

wf test: preserve compatibility with WebKit engines without AbortSignal.any() #335

Closed

Description

@ambroise-leclerc

Problem

PR #334 introduces an unconditional use of AbortSignal.any() whenever wf test receives a cancellation signal (js/developer/environment/runtime.mjs, line 210 at commit 04779d9b259a22e13ea9cc2bad3c07052db94504). The terminal always supplies that signal.

AbortSignal.any() was introduced in Safari/WebKit 17.4, while WebFront supports WKWebView on macOS 13.3 and later. Installations with an earlier WebKit engine therefore fail immediately with:

TypeError: AbortSignal.any is not a function

The call occurs before the command's try block, so no structured test report is produced and the timeout created immediately beforehand is not cleared by finally.

Reproduction

  1. Run the environment on a WebKit engine predating Safari 17.4, or simulate its missing API by setting AbortSignal.any = undefined in an isolated test.
  2. Invoke wf test through the terminal, which provides a cancellation signal.
  3. Observe the TypeError before any project read or spec execution.

The missing-API case was reproduced against the command's implementation at 04779d9.

Expected behavior

Compose cancellation and timeout signals with a compatible fallback when AbortSignal.any is unavailable. Both Ctrl+C and the command deadline must retain their documented exit codes and structured reports. Add regression coverage with AbortSignal.any unavailable.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions