Skip to content

test: port upstream regression tests for repeated calls, exit codes, abort, terminate and issues #494, #611, #687, #719 - #81

Merged
Project516 merged 3 commits into
masterfrom
test/upstream-regressions
Oct 6, 2026
Merged

Project516 merged 3 commits into
masterfrom
test/upstream-regressions

Conversation

@Project516

@Project516 Project516 commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

What and why

Ports the useful tests from upstream ffmpegwasm/ffmpeg.wasm ffmpegwasm#950, ffmpegwasm#962 and ffmpegwasm#968 into the existing Mocha suites (no Vitest). Tests only, no CHANGELOG entry. Anything that waits on a command uses an endless lavfi input (testsrc=d=600), so it cannot finish first.

Mapping

New test Suite Upstream
identical output across repeated exec(), no input/output carry-over core ffmpegwasm#962 exec/repeated-calls
ffprobe -select_streams not kept, ffprobe alternating with exec core, node ffmpegwasm#962 ffprobe/repeated-calls
exit codes: unknown option, missing input, unknown encoder, no output, core.ret match, no throw on abort core ffmpegwasm#962 exec/exit-codes
reset() keeps logger and progress handlers core ffmpegwasm#962 reset
exit codes and run-after-failure through the worker browser, node ffmpegwasm#962 exit-codes
abort rejects exec() and file calls with AbortError browser, node ffmpegwasm#950 abort/signal
terminate rejects pending calls, rejects later calls, reloads with a fresh FS, no-op when never loaded browser, node ffmpegwasm#950 terminate
load() on a loaded instance keeps the core and files (browser copy; node already had it) browser ffmpegwasm#968 ffmpegwasm#494

Skipped

Not run locally

Core tests (tests/ffmpeg-core.test.js) and browser tests (tests/ffmpeg.test.js) were not run. The node tests were run against the old debug st core: all new ones pass except the it.skip below, which was verified by reading bind.js. Existing transcode tests time out on that old core, as expected. pnpm lint passes.

Noticed, not fixed

Upstream issue ffmpegwasm#611 applies to us: bind.js declared function setTimeout, which shadowed the global one for Emscripten's glue. It is fixed in #82, with its test, so this PR no longer carries the skipped check.

Review

review-bot did not review this PR, so a Sonnet reviewer did. It found nothing blocking. The abort and terminate tests settle synchronously, no test depends on another's file system state, and outputs are cleaned up. Its low-severity notes: some nonzero exit code checks would also pass for a swallowed abort, and one test name overstated what it checked. That test is renamed in the latest commit.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

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 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: bfe142d1-66b0-4466-a326-0ed293fd46be
📥 Commits

Reviewing files that changed from the base of the PR and between 415f0bd and 436a582.

📒 Files selected for processing (3)
  • tests/ffmpeg-core.test.js
  • tests/ffmpeg-node.test.mjs
  • tests/ffmpeg.test.js
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@project516-review-bot project516-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR ports upstream regression tests for repeated exec/ffprobe calls, exit codes, abort signals, terminate behavior, and load() on an already-loaded instance. Tests are added to the core, Node, and browser Mocha suites. All tests use endless lavfi inputs where needed so commands cannot finish before the call settles. The test structure is sound: each suite cleans up after itself, no test depends on another's filesystem state, and abort/terminate promises settle synchronously.


review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict approve

@Project516
Project516 merged commit db5c491 into master Oct 6, 2026
19 checks passed
@Project516
Project516 deleted the test/upstream-regressions branch October 6, 2026 01:48
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