Skip to content

fix(unit-tests): make tests opt-in via testables#12

Merged
IvanMurzak merged 5 commits intoIvanMurzak:devfrom
RageAgainstThePixel:main
Mar 11, 2026
Merged

fix(unit-tests): make tests opt-in via testables#12
IvanMurzak merged 5 commits intoIvanMurzak:devfrom
RageAgainstThePixel:main

Conversation

@StephenHodgson
Copy link
Contributor

@StephenHodgson StephenHodgson commented Mar 10, 2026

Summary

  • 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 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.
  • Existing test asmdefs (optionalUnityReferences: TestAssemblies) support testables; no asmdef changes required for testables.

Documentation

- 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.
@StephenHodgson StephenHodgson marked this pull request as ready for review March 10, 2026 18:30
Copilot AI review requested due to automatic review settings March 10, 2026 18:30
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 makes package tests opt-in for consumers by using Unity’s testables mechanism in the Unity test projects and documenting how to enable tests when desired.

Changes:

  • Add testables: ["extensions.unity.playerprefsex"] to the Unity-Tests project manifests for 2022.3, 2023.2, and 6000.3.
  • Update the package README to document that tests are opt-in and how to enable them via Packages/manifest.json.
  • Update test asmdefs to rely on optionalUnityReferences: ["TestAssemblies"] and remove explicit TestRunner/NUnit override references.

Reviewed changes

Copilot reviewed 6 out of 6 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 Opt-in package tests via testables for the Unity 6000.3 test project.
Unity-Tests/2023.2.22f1/Packages/manifest.json Opt-in package tests via testables for the Unity 2023.2 test project.
Unity-Tests/2022.3.62f3/Packages/manifest.json Opt-in package tests via testables for the Unity 2022.3 test project.
Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.PlayerPrefsEx.Tests.asmdef Adjust runtime test assembly references to use optional test assemblies.
Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.PlayerPrefsEx.Editor.Tests.asmdef Adjust editor test assembly references to use optional test assemblies.
Unity-Package/Assets/root/README.md Document how to opt in to running package tests using testables.

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

Copilot AI review requested due to automatic review settings March 10, 2026 18:48
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


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

@StephenHodgson StephenHodgson changed the title fix(package): make tests opt-in via testables fix(unit-tests): make tests opt-in via testables Mar 10, 2026
Copilot AI review requested due to automatic review settings March 10, 2026 23:04
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.


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

@IvanMurzak IvanMurzak changed the base branch from main to dev March 11, 2026 09:04
@IvanMurzak IvanMurzak merged commit 559df9e into IvanMurzak:dev Mar 11, 2026
3 of 22 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.

3 participants