Skip to content

Use actual WordPress in Playground tests #463

@eliot-akira

Description

@eliot-akira

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions