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__
shared
CallEvent-test.tsx
DateSeparator-test.tsx
EncryptionEvent-test.tsx
MBeaconBody-test.tsx
MImageBody-test.tsx
MKeyVerificationConclusion-test.tsx
MLocationBody-test.tsx
MPollBody-test.tsx Fix `getRelationsForEvent` under TypeScript `strict` mode (#9558) 2022-11-21 20:54:24 -07:00
MVideoBody-test.tsx
MessageActionBar-test.tsx
MessageEvent-test.tsx
TextualBody-test.tsx