-
Notifications
You must be signed in to change notification settings - Fork 329
Description
From discussion in #427 comment.
wp-now
could be useful for server-side tests to make use of a full WordPress environment
A difficulty: if wp-now
imports from the Playground package being tested, the tests cannot import from wp-now
because it results in a circular dependency.
When I imported the package from the test, I got an error from nx or vitest, "Could not execute command because the task graph has a circular dependency" - because that package imports blueprints.
That’s a challenging one. Perhaps building wp-now to a single bundle and then using that to run Blueprints tests would solve it here. This is the second time this comes up today- the first time was in #434
Found a documentation page about this in the nx
repository.
Resolving Circular Dependencies
Strategies recommended:
- Make more granular projects with less inter-dependence
- Or merge such projects into a single project that is free to depend on itself
- Or separate the extra logic into a new project that is shared between the projects which desire this logic