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

Add type to jest matcher #618

Merged
merged 4 commits into from
Feb 15, 2022
Merged

Add type to jest matcher #618

merged 4 commits into from
Feb 15, 2022

Conversation

ndowmon
Copy link
Contributor

@ndowmon ndowmon commented Feb 10, 2022

Added

  • Updated jest matchers in the following way:

    • added optional _type argument to .toMatchGraphObjectSchema matcher
    • added optional _type and _class arguments to
      .toMatchDirectRelationshipSchema matcher

    This enables developers to simply pass the StepEntityMetadata and
    StepRelationshipMetadata interfaces to these matchers. Usage:

    expect(collectedEntities).toMatchGraphObjectSchema(Entities.USER);
    expect(collectedRelationships).toMatchDirectRelationshipSchema(
      Relationships.ACCOUNT_HAS_USER,
    );

@ndowmon
Copy link
Contributor Author

ndowmon commented Feb 10, 2022

Fixes #613 and #614

Base automatically changed from add-schema-to-graph-object-metadata to main February 14, 2022 14:49
@ndowmon ndowmon requested review from austinkelleher and a team February 15, 2022 14:51
@ndowmon ndowmon merged commit ae7f316 into main Feb 15, 2022
@ndowmon ndowmon deleted the add-type-to-jest-matcher branch February 15, 2022 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants