Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve assertGenericTypeAnnotationHasExactlyOneTypeParameter tests (#…
…34942) Summary: #34933 has been merged just after I pushed a new commit to the branch to improve tests of `assertGenericTypeAnnotationHasExactlyOneTypeParameter` function, but the last commit was not imported to the internal repository. The `assertGenericTypeAnnotationHasExactlyOneTypeParameter` can throw different types of Error, and I believe that `.toThrow(Error)` is not specific enough. So I replaced it with `toThrowErrorMatchingInlineSnapshot()`. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Changed] - Improve assertGenericTypeAnnotationHasExactlyOneTypeParameter tests in parsers-commons Pull Request resolved: #34942 Test Plan: Some test cases were ok because the assertGenericTypeAnnotationHasExactlyOneTypeParameter function threw an Error, but for the wrong reason. I've made sure that the error displayed in the inline snapshot is the one we expect. Reviewed By: cortinico Differential Revision: D40384993 Pulled By: cipolleschi fbshipit-source-id: aaa943be1e808af2c5131f7d06baf24bc3bffa31
- Loading branch information