Skip to content

test(hang): run the libav copy test after the AAC fallback test - #6382

Merged
kixelated merged 1 commit into
mainfrom
fix/hang-libav-test-order
Oct 22, 2026
Merged

kixelated merged 1 commit into
mainfrom
fix/hang-libav-test-order

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

js/hang/src/util/libav.copy.test.ts (moq-dev/moq#6284) installs the WebCodecs polyfill into Bun's globals. Bun runs test files in one process, in name order, so it runs before libav.test.ts. That file's AAC fallback test opens by asserting no AudioDecoder exists yet, so every @moq/hang run on main now fails it:

error: expect(received).toBeUndefined()
Received: [class AudioDecoder extends AudioDecoder]
(fail) the fallback decodes AAC without a native AudioDecoder

Any PR whose just check reaches @moq/hang (directly, or through @moq/net or @moq/qmux) fails on it.

Approach

Move the copy test into libav.test.ts, after the AAC test, and delete the separate file. Both tests keep their assertions. The AAC test checks its premise before installing the polyfill, and the copy test only needs the polyfill installed.

Impact

Tests only. No public API or wire change.

Validation

bun test in js/hang: 277 pass, 0 fail (276 and 1 fail on main).

🤖 Generated with Claude Code

https://claude.ai/code/session_01EeyiEy5FWz3z44DYZVo7vU

(Written by Claude Opus 5.5)

libav.copy.test.ts installs the WebCodecs polyfill into Bun's globals,
and Bun runs test files in one process in name order, so it ran before
libav.test.ts, whose premise is that no AudioDecoder exists yet. Every
`@moq/hang` test run on main failed that premise.

Move the copy test into libav.test.ts, after the AAC test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EeyiEy5FWz3z44DYZVo7vU
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T20:42:30.087733Z 48a08f8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3b40aee3-5897-4293-b91b-8317fdee1dcd
📥 Commits

Reviewing files that changed from the base of the PR and between 52ed4cb and 48a08f8.

📒 Files selected for processing: 2
  • js/hang/src/util/libav.copy.test.ts
  • js/hang/src/util/libav.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant