ci: Run unit tests in CI and guard undefined variables - #287
Merged
Conversation
This guards a pre-existing crash when variables change from a defined object to undefined. PR bigbluebutton#279 reduces the bug's exposure but does not introduce it.
Arthurk12
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The unit test suite added by #279 currently runs only when invoked manually. This PR turns it into a pull request regression gate and prevents a pre-existing custom subscription crash exposed by an adversarial variables transition.
The two commits specific to this PR:
Unit testsworkflow based on the pick-random-user CI pattern, adapted for the SDK: Node.js 20, dependency installation,test:unit:coverage, and coverage artifact upload. It intentionally omits the plugin-specific merge-branches action and removes the deadautomated-tests-publish-results.ymlworkflow, whose expectedAutomated testsproducer does not exist onv0.0.x.variablesdefined-to-undefined transition before parsing normalized state, with a regression test that verifies unsubscribe and resubscribe behavior. PR 279 reduced this bug's exposure but did not introduce it.Implements #285
How to verify
Locally, all 32 unit tests pass, coverage completes, TypeScript builds successfully, and ESLint reports no errors. The
Unit testsworkflow runs the same coverage command for pull requests and uploadscoverage/even when the test step fails.