Skip to content

Add tests#10

Merged
HichemTab-tech merged 9 commits intomasterfrom
add-tests
Sep 6, 2025
Merged

Add tests#10
HichemTab-tech merged 9 commits intomasterfrom
add-tests

Conversation

@HichemTab-tech
Copy link
Owner

No description provided.

Enhanced test coverage for `useSharedState`, `useSharedFunction`, and `useSharedSubscription` hooks to validate their behavior with shared resources, lifecycle management, and scoping capabilities.

- Added tests for `useSharedState` to verify state sharing between components and isolation via `SharedStatesProvider`.
- Introduced `useSharedFunction` tests to ensure proper handling of async functions, state clearing, and forced executions.
- Implemented `useSharedSubscription` tests to confirm subscription lifecycle handling, including automatic unsubscription on component unmount.
- Enhanced mocking for predictable key generation in test instances.
- Fixed issues in `clear` methods for `sharedFunctionsData` and `sharedSubscriptionsData` to properly reset state and notify listeners.
Introduced a new GitHub workflow to automate testing on `master` branch pushes and pull requests. Ensures consistent test execution on every code change.

- Configured triggers for `push` and `pull_request` events on the `master` branch.
- Set up tasks to install dependencies using `pnpm` and run tests.
- Utilized `actions/setup-node` to specify Node.js version `23.x`.
Updated the auto-bumper GitHub Actions workflow to point to the root-level `package.json` instead of the nested `surveyjs-builder` path. This ensures the correct package file is referenced during automated operations.
Updated the auto-bumper GitHub Actions workflow to point to the root-level `package.json` instead of the nested `surveyjs-builder` path. This ensures the correct package file is referenced during automated operations.
The `push` event trigger for the `master` branch was removed from the GitHub Actions test workflow, as it's no longer required. The workflow now focuses on pull request events to streamline automation.
@HichemTab-tech
Copy link
Owner Author

@github-bot bump

@github-actions
Copy link

github-actions bot commented Sep 6, 2025

Okay boss, ⏳ Bumping version to 1.0.7...

@github-actions
Copy link

github-actions bot commented Sep 6, 2025

✅ Version bumped to 1.0.8

Updated the auto-bumper workflow to capitalize "BOSS" in the comment body for consistency and improved emphasis. This minor change enhances the clarity and tone of the message.
@HichemTab-tech HichemTab-tech merged commit 743f3ad into master Sep 6, 2025
2 checks passed
@HichemTab-tech HichemTab-tech deleted the add-tests branch September 6, 2025 14:02
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