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

tests(smoke): test array _includes and lhr.timing #13619

Merged
merged 3 commits into from
Feb 3, 2022

Conversation

adamraine
Copy link
Member

Landing the smoke test changes separate from #13569.

@adamraine adamraine requested a review from a team as a code owner February 2, 2022 23:31
@adamraine adamraine requested review from connorjclark and removed request for a team February 2, 2022 23:31
@@ -64,11 +64,14 @@ Individual elements of an array can be asserted by using numeric properties in a

However, if an array literal is used as the expectation, an extra condition is enforced that the actual array _must_ have the same length as the provided expected array.

Arrays can be checked against a subset of elements using the special `_includes` property. The value of `_includes` _must_ be an array.
Copy link
Collaborator

@connorjclark connorjclark Feb 2, 2022

Choose a reason for hiding this comment

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

What did you think of naming this _subarray or _subset? For example, if another _ helper were added that didn't exclude items as it checked each item, what would the two helpers be named to distinguish them from each other?

should add a note that each assertion in _include will exclude the matching item from consideration in the rest, perhaps with an example showing that

Copy link
Member Author

Choose a reason for hiding this comment

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

if another _ helper were added that didn't exclude items as it checked each item, what would the two helpers be named to distinguish them from each other?

I'm ok with _subset, but I can't think of a situation where I would use a helper that doesn't exclude as it goes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK. let's just use _includes for now then.

@adamraine adamraine merged commit 83e2d3c into master Feb 3, 2022
@adamraine adamraine deleted the includes-array-smoke branch February 3, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants