Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw ElementError when the module is not of the expected type #4104

Merged
merged 7 commits into from
Sep 18, 2023

Commits on Sep 18, 2023

  1. Implement check for type of $module

    Simply replaces `return this` with explicit `throw` as trying to factor further leads to extra complexity figuring out inheritance and typing, which we can do after v5 is shipped.
    
    request-checks: true
    romaricpascal authored and colinrotherham committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    4c84608 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7590f72 View commit details
    Browse the repository at this point in the history
  3. Refactor the test for whether $module is missing or wrong type

    Introduce a new `ElementError` that handles the check to format different message so we do not repeat it in each component
    romaricpascal authored and colinrotherham committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    70e1277 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1deaeb0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e81c34a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f77e1d7 View commit details
    Browse the repository at this point in the history
  7. Move error tests to JSDOM environment

    Some tests expected window globals that no longer exist in unit tests. We may prefer to mock these in future without JSDOM
    colinrotherham committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    655af8f View commit details
    Browse the repository at this point in the history