Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Triggerkeypath now fails typecheck on invalid array indices#2404

Merged
melnikov-s merged 1 commit intomainfrom
react-testing-trigger-key-path-fix-index
Sep 6, 2022
Merged

Triggerkeypath now fails typecheck on invalid array indices#2404
melnikov-s merged 1 commit intomainfrom
react-testing-trigger-key-path-fix-index

Conversation

@melnikov-s
Copy link
Contributor

Description

triggerKeypath is supposed to fail when accessing an array index with an invalid value (not an integer) ie

wrapper.triggerKeypath('secondaryActions[foo].onAction)

This never worked due to an incorrect extends clause. This PR will no correctly flag the above as a type error.

@melnikov-s melnikov-s requested a review from BPScott September 6, 2022 14:30
@melnikov-s melnikov-s requested a review from a team as a code owner September 6, 2022 14:30
@melnikov-s melnikov-s force-pushed the react-testing-trigger-key-path-fix-index branch from 3241e8a to afdf2f9 Compare September 6, 2022 21:23
@melnikov-s melnikov-s merged commit 3ed8e7d into main Sep 6, 2022
@melnikov-s melnikov-s deleted the react-testing-trigger-key-path-fix-index branch September 6, 2022 21:33
@github-actions github-actions bot mentioned this pull request Sep 6, 2022
@shopify-shipit shopify-shipit bot temporarily deployed to production-gem July 5, 2024 16:32 Inactive
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.

2 participants