keithamus/observable-polyfill

tearDown order needs to be upstream->downstream on consumer-initiated unsubscription

Open

#30 opened on Jul 30, 2025

View on GitHub
 (7 comments) (0 reactions) (0 assignees)JavaScript (5 forks)github user discovery
bughelp wanted

Repository metrics

Stars
 (16 stars)
PR merge metrics
 (PR metrics pending)

Description

About

  • wpt test "Teardowns are called in upstream->downstream order on consumer-initiated unsubscription" fails

Expected behavior

  • tearDown order:
    • "upstream abort handler"
    • "upstream teardown. reason: Abort!"
    • "middle abort handler"
    • "middle teardown. reason: Abort!"
    • "downstream abort handler"
    • "downstream teardown. reason: Abort!"

Current behavior

  • tearDown order:
    • "downstream abort handler"
    • "middle abort handler"
    • "upstream abort handler"
    • "upstream teardown. reason: Abort!"
    • "middle teardown. reason: Abort!"
    • "downstream teardown. reason: Abort!"

How to reproduce

  • npm run test-serve and inspect wpt test results in the browser

Additional context

https://github.com/keithamus/observable-polyfill/blob/5af5df1b6bb87abc44a773701ebcf64c1d1f25c7/test/wpt/observable-constructor.any.js#L728-L763

Contributor guide