Skip to content

ci: Run unit tests in CI and guard undefined variables - #287

Merged
GuiLeme merged 3 commits into
bigbluebutton:v0.0.xfrom
GuiLeme:ci/unit-tests-v0.0.x-v1
Aug 13, 2026
Merged

ci: Run unit tests in CI and guard undefined variables#287
GuiLeme merged 3 commits into
bigbluebutton:v0.0.xfrom
GuiLeme:ci/unit-tests-v0.0.x-v1

Conversation

@GuiLeme

@GuiLeme GuiLeme commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

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:

  1. Add a Unit tests workflow 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 dead automated-tests-publish-results.yml workflow, whose expected Automated tests producer does not exist on v0.0.x.
  2. Guard the pre-existing variables defined-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

npm install
npm run test:unit
npm run test:unit:coverage
npm run build
npm run lint

Locally, all 32 unit tests pass, coverage completes, TypeScript builds successfully, and ESLint reports no errors. The Unit tests workflow runs the same coverage command for pull requests and uploads coverage/ even when the test step fails.

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.
@GuiLeme
GuiLeme requested a review from Arthurk12 August 12, 2026 14:57
@GuiLeme
GuiLeme merged commit 106fac6 into bigbluebutton:v0.0.x Aug 13, 2026
5 checks passed
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.

2 participants