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

fix: symbol key could not be enum. #14414

Merged
merged 9 commits into from
Aug 17, 2023
Merged

Conversation

eryue0220
Copy link
Contributor

Summary

Fix: #14308

Test plan

Test at local.

e2e/__tests__/symbolKey.test.ts
  ✓ run test with symbol key (297 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   1 passed, 1 total
Time:        0.596 s, estimated 1 s

@netlify
Copy link

netlify bot commented Aug 15, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b5e0252
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/64dded67b2d01d00073a0706
😎 Deploy Preview https://deploy-preview-14414--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@eryue0220 eryue0220 changed the title fix: issue 14308 fix: symbol key could not be enum. Aug 15, 2023
Copy link
Contributor

@mrazauskas mrazauskas left a comment

Choose a reason for hiding this comment

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

Thanks. I left a couple of comments.

Also rebase the branch, please. The lint error should go away.

packages/expect/src/asymmetricMatchers.ts Outdated Show resolved Hide resolved
e2e/__tests__/symbolKey.test.ts Outdated Show resolved Hide resolved
@mrazauskas
Copy link
Contributor

Thanks. Implementation looks good. Please consider #14414 (comment)

The thing is that writing e2e tests for all the use cases of asymmetric matchers would create too many files. In this case unit tests are sufficient. They allow creating lots of test cases easily. For example, did you consider adding a negative test?

Keep in mind that expect can be installed and used without Jest. Therefore keeping its tests inside the package boundaries is also good idea.

@eryue0220
Copy link
Contributor Author

Thanks. Implementation looks good. Please consider #14414 (comment)

The thing is that writing e2e tests for all the use cases of asymmetric matchers would create too many files. In this case unit tests are sufficient. They allow creating lots of test cases easily. For example, did you consider adding a negative test?

Keep in mind that expect can be installed and used without Jest. Therefore keeping its tests inside the package boundaries is also good idea.

Ok, thank you. I will fix it later

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

thanks!

@SimenB SimenB merged commit 9c8fdbb into jestjs:main Aug 17, 2023
4 checks passed
@SimenB
Copy link
Member

SimenB commented Aug 21, 2023

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: objectContaining doesn't handle Symbols
3 participants