Skip to content

Add unit test for createModeledMethodKey#3521

Merged
shati-patel merged 3 commits intomainfrom
shati-patel/modeled-method-test
Mar 28, 2024
Merged

Add unit test for createModeledMethodKey#3521
shati-patel merged 3 commits intomainfrom
shati-patel/modeled-method-test

Conversation

@shati-patel
Copy link
Copy Markdown
Contributor

Follow up to #3518 to add some tests! 🧪

I'm not really sure what else to test 🤔 Suggestions welcome ❤️

Checklist

N/A, no user impact

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@shati-patel shati-patel requested a review from a team as a code owner March 27, 2024 17:22
Copy link
Copy Markdown
Member

@koesie10 koesie10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

For additional tests, I think you might be able to get some inspiration from the validation.test.ts unit tests:

Comment on lines +77 to +78
expect(modeledMethod === modeledMethod2).toBe(false);
expect(key === key2).toBe(true);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should result in better error messages:

Suggested change
expect(modeledMethod === modeledMethod2).toBe(false);
expect(key === key2).toBe(true);
expect(modeledMethod).not.toBe(modeledMethod2);
expect(key).toEqual(key2);

@shati-patel
Copy link
Copy Markdown
Contributor Author

Thank you for the pointers, @koesie10! I've added some more tests 🧪

Copy link
Copy Markdown
Member

@koesie10 koesie10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@shati-patel shati-patel merged commit 7a41d9c into main Mar 28, 2024
@shati-patel shati-patel deleted the shati-patel/modeled-method-test branch March 28, 2024 11:32
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