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

[Bug]: expect($data)->toHaveKey("msg") #1307

Open
flogliu opened this issue Oct 27, 2024 · 1 comment
Open

[Bug]: expect($data)->toHaveKey("msg") #1307

flogliu opened this issue Oct 27, 2024 · 1 comment
Labels

Comments

@flogliu
Copy link

flogliu commented Oct 27, 2024

What Happened

When I use expect($data)->toHaveKey("msg") is Fail, but use expect($data)->toHaveKey("msg") is Success

How to Reproduce

When I use data[array] as an object.

Sample Repository

No response

Pest Version

3.5

PHP Version

8.3.11

Operation System

macOS

Notes

No response

@flogliu flogliu added the bug label Oct 27, 2024
@danielh-official
Copy link

expect($data)->toHaveKey("msg")

expect($data)->toHaveKey("msg")

These are the exact same lines of code. Are you stating that the code fails sometimes and succeeds in others?

Repeating tests can help you deal with flakiness, such that you can see the number of times the same code succeeds or fails.

Otherwise, please provide more context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants