Skip to content

Conversation

@goldenapples
Copy link
Collaborator

@goldenapples goldenapples commented Jan 2, 2026

Adds a set of unit tests covering all the main plugin functionality, which runs using wp-env.

This also includes some updates to the synced pattern helper files that previously were hardcoded - rather than just building out a single synced pattern for every pattern that it's called on, this allows for specifying a key and title when calling Synced_Patterns\get_or_create() - for example: you may want all posts in one post type to import with one synced pattern for a CTA section, but use a different synced pattern for posts in a different post type.

Added bonus: these tests uncovered a few edge cases around markup sanitization that weren't defined or built out previously.

Covers helpers in the ACF and Blocks namespaces using mocks. Full test
suite covering template parsing is to come.
Includes fixtures for parsing and replacing content in templates.
@goldenapples goldenapples changed the title Add basic unit test suite Add linting and basic unit tests Jan 7, 2026
@goldenapples goldenapples marked this pull request as ready for review January 7, 2026 19:02
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.

2 participants