element-web/test/components/views/messages
Eric Eastwood 2393510a7f
Fix `getRelationsForEvent` under TypeScript `strict` mode (#9558)
* Fix getRelationsForEvent tsc strictness

* Use shared type for GetRelationsForEvent

* Fix lint

* Add alternative type

* getRelationsForEvent is not required

* Relations are optional

* Reactions are optional

* We expect relations in these tests

* Add more protection if the eventID is not defined

* Allow null too

* Better test typing

* User ID is not necessary unless something is selected

* It's okay to [].includes(null)

* Null is as good as undefined here

* Null or undefined is good here

* We have some expectations for the tests

* The room and user can be undefined too

* Protec

* Reactions are optional

* Try match signatures

* Null or undefined

* More null or undefined

* Protec

* Fix typo (wrong variable)

* Remove optional params

See https://github.com/matrix-org/matrix-react-sdk/pull/9558#discussion_r1017515913

* Fix up last maaaaybe relevant lint

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-11-21 20:54:24 -07:00
..
__snapshots__ Remove all usages of UNSAFE_* React methods (#9583) 2022-11-18 09:22:43 +00:00
shared Task - replace img icons with svg components (#8963) 2022-07-06 13:29:26 +02:00
CallEvent-test.tsx Extract requestMediaPermissions (#9568) 2022-11-11 10:38:51 +01:00
DateSeparator-test.tsx Optimise Jest run in CI (#9542) 2022-11-04 10:48:08 +00:00
EncryptionEvent-test.tsx Wire local room logic (#9078) 2022-07-20 09:26:25 +02:00
MBeaconBody-test.tsx Update matrix-org/react (enzyme deprecation) (#9116) 2022-08-02 15:10:43 +02:00
MImageBody-test.tsx Differentiate download and decryption errors when showing images (#9562) 2022-11-10 09:27:20 +00:00
MKeyVerificationConclusion-test.tsx Optimise Jest run in CI (#9542) 2022-11-04 10:48:08 +00:00
MLocationBody-test.tsx Update matrix-org/react (enzyme deprecation) (#9116) 2022-08-02 15:10:43 +02:00
MPollBody-test.tsx Fix `getRelationsForEvent` under TypeScript `strict` mode (#9558) 2022-11-21 20:54:24 -07:00
MVideoBody-test.tsx Migrate some tests to React Testing Library (#9584) 2022-11-18 09:16:11 +00:00
MessageActionBar-test.tsx fix threadsupport type issues in tests (#9359) 2022-10-06 08:35:06 +00:00
MessageEvent-test.tsx Always show voice broadcasts tile (#9444) 2022-10-19 12:04:15 +02:00
TextualBody-test.tsx Fix missing avatar for show current profiles (#9563) 2022-11-11 16:02:01 +00:00