Skip to content

Conversation

@tobi
Copy link
Member

@tobi tobi commented Jan 2, 2026

Summary

Adds support for individual specs to declare required_features, allowing them to be skipped when the adapter doesn't support those features.

Changes

  • Add required_features field to Unit struct
  • Add runnable_with? and missing_features methods to Unit
  • Filter specs by required_features in the runner
  • Add shopify_error_handling feature for Shopify-specific error behavior
  • Move test_subcontext_enter_fails to error_handling.yml with required_features: [shopify_error_handling]

Why

The test_subcontext_enter_fails_and_leaves_runtime_in_good_state test expects specific Shopify-internal error behavior (Liquid error (line 2): internal) that differs from the open source implementation. The open source Liquid correctly renders the template, but Shopify's internal version uses a custom context class that forces errors.

By adding per-spec required_features, we can skip this test for adapters that don't implement Shopify's internal error handling while still running it for Shopify's internal implementation.

Example usage in YAML

- name: some_test
  required_features:
    - shopify_error_handling
  template: "..."
  expected: "..."

- Add required_features field to Unit struct
- Add runnable_with? and missing_features methods to Unit
- Filter specs by required_features in runner
- Add shopify_error_handling feature for Shopify-specific error behavior
- Move test_subcontext_enter_fails to error_handling.yml with required_features

This allows individual specs to declare required features, so they can be
skipped when the adapter doesn't support those features. The test for
subcontext error handling requires Shopify-internal error behavior that
differs from the open source implementation.
@tobi tobi merged commit 217dd35 into main Jan 2, 2026
1 of 2 checks passed
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.

1 participant