configure custom package with unit tests

I have a custom package with some reusable code in it.
I want to move my unit tests into this package.
I have been following the standards outlined on this page:

But no matter what i try. The unit tests are never recognized by the Test Runner when stored in the package. They work fine outside the package… but when placed into the package they are not seen.

Does anyone have a working example i can snoop through to figure out what I am missing?
Is there a trick to this setup that is not obvious?

Thanks
J.

1 Like

I have done some more experiments to try and resolve my issue:

I created a very simple package. It contains one runtime and one editor script. It contains one runtime and one editor unit test…

When the package is manually dropped into the packages folder it works. The unit tests are visible:

but when the same package is loaded as a “local” package the unit test are no longer recognized.

Setting the
“testables”
property in the package.json file appears to have no effect on having the unit tests be shown/recognized.

I can really use some help on this.

SOLVED - i missed that the testables entry needs to be made in the MANIFEST file not the PACKAGE file.

1 Like

If anyone finds this thread… and is encountering problems… my experience inspired me to create a new package I may release on the asset store:

2 Likes