You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 1, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 1, 2025. It is now read-only.
it's because dev folder doesn't have test command, you can run yarn jest in the root folder or install jest to dev package.json. But tests still won't run because you need to somehow configure it to work with Payload local api. Would be great if we had this pre-configured (like in Payload repository), tests are making our plugins code base much better. While you can keep a plugin that only adds some ui without tests (e2e front end isn't worth imo), but when plugin does business logic with database you should write integration tests.
Activity
Redhorse7422 commentedon Jan 15, 2024
Hi i am facing this same issue have you got any solution for that ?
r1tsuu commentedon Mar 29, 2024
it's because dev folder doesn't have
testcommand, you can runyarn jestin the root folder or install jest to dev package.json. But tests still won't run because you need to somehow configure it to work with Payload local api. Would be great if we had this pre-configured (like in Payload repository), tests are making our plugins code base much better. While you can keep a plugin that only adds some ui without tests (e2e front end isn't worth imo), but when plugin does business logic with database you should write integration tests.cgilly2fast commentedon Sep 1, 2024
I just made a PR fixing this issue: https://github.com/payloadcms/plugin-template/pulls