Skip to content

Make tests opt-in via testables and update documentation#13

Merged
IvanMurzak merged 7 commits intomainfrom
dev
Mar 11, 2026
Merged

Make tests opt-in via testables and update documentation#13
IvanMurzak merged 7 commits intomainfrom
dev

Conversation

@IvanMurzak
Copy link
Owner

This pull request updates the package version to 2.1.3 and improves the test configuration and documentation for the extensions.unity.playerprefsex Unity package. The main focus is to clarify how to enable and run package tests, ensure test assemblies are properly configured, and update project manifests to support test discovery.

Testing and Documentation Improvements:

  • Added documentation to the README.md explaining how to enable and run the package's tests by adding the package to the testables array in Packages/manifest.json, with links to relevant Unity documentation.
  • Updated test assembly definition files (Extensions.Unity.PlayerPrefsEx.Editor.Tests.asmdef, Extensions.Unity.PlayerPrefsEx.Tests.asmdef) to use optionalUnityReferences for TestAssemblies, set UNITY_INCLUDE_TESTS in defineConstraints, and simplify references to improve test discoverability and compatibility. [1] [2]
  • Added the package to the testables array in example Unity project manifests to ensure the package tests are loaded by the Unity Test Runner. [1] [2] [3]

Version Updates:

  • Bumped the package version from 2.1.2 to 2.1.3 in package.json and the Installer class to reflect these changes. [1] [2]

StephenHodgson and others added 7 commits March 10, 2026 14:15
- Add "testables": ["extensions.unity.playerprefsex"] to Unity-Tests project manifests (2022.3, 2023.2, 6000.3) so package tests load only in those projects; other dependents do not list testables and do not load package tests by default.
- Document in package README that tests are opt-in and that consumers must add the package to the testables array in Packages/manifest.json to run the package tests, with links to Unity testables and package-test docs.
- Existing test asmdefs (optionalUnityReferences: TestAssemblies) already support the Test Framework; no asmdef changes required for testables.
fix(unit-tests): make tests opt-in via testables
@IvanMurzak IvanMurzak self-assigned this Mar 11, 2026
Copilot AI review requested due to automatic review settings March 11, 2026 09:05
@IvanMurzak IvanMurzak added the enhancement New feature or request label Mar 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the extensions.unity.playerprefsex Unity package to make package tests opt-in via Unity’s testables mechanism, and refreshes related docs/config to improve test discovery in sample Unity projects.

Changes:

  • Bumps package version to 2.1.3.
  • Updates test .asmdef files to rely on optionalUnityReferences: ["TestAssemblies"] and UNITY_INCLUDE_TESTS.
  • Documents how to enable tests via Packages/manifest.json and updates sample project manifests to include the package in testables.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Unity-Tests/6000.3.1f1/Packages/manifest.json Adds testables entry so package tests load in the Test Runner for this sample project.
Unity-Tests/2023.2.22f1/Packages/manifest.json Adds testables entry so package tests load in the Test Runner for this sample project.
Unity-Tests/2022.3.62f3/Packages/manifest.json Adds testables entry so package tests load in the Test Runner for this sample project.
Unity-Package/Assets/root/package.json Bumps package version to 2.1.3.
Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.PlayerPrefsEx.Tests.asmdef Adjusts runtime test assembly to use optional test references and UNITY_INCLUDE_TESTS.
Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.PlayerPrefsEx.Editor.Tests.asmdef Adjusts editor test assembly similarly, including UNITY_INCLUDE_TESTS.
Unity-Package/Assets/root/README.md Adds documentation explaining opt-in test enablement via testables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@IvanMurzak IvanMurzak merged commit 0f881ab into main Mar 11, 2026
37 checks passed
@IvanMurzak IvanMurzak deleted the dev branch March 11, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants